Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for partNumberToRangeSpec (0.13 sec)

  1. cmd/api-headers.go

    		}
    	}
    
    	var start, rangeLen int64
    	totalObjectSize, err := objInfo.GetActualSize()
    	if err != nil {
    		return err
    	}
    
    	if rs == nil && opts.PartNumber > 0 {
    		rs = partNumberToRangeSpec(objInfo, opts.PartNumber)
    	}
    
    	// For providing ranged content
    	start, rangeLen, err = rs.GetOffsetLength(totalObjectSize)
    	if err != nil {
    		return err
    	}
    
    	// Set content length.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue May 28 04:44:00 UTC 2024
    - 7K bytes
    - Viewed (0)
  2. cmd/object-api-utils.go

    	for _, match := range entriesTrie.PrefixMatch(fmt.Sprintf("%.5d.%s.", partNumber, etag)) {
    		partFile = match
    		break
    	}
    	return partFile
    }
    
    func partNumberToRangeSpec(oi ObjectInfo, partNumber int) *HTTPRangeSpec {
    	if oi.Size == 0 || len(oi.Parts) == 0 {
    		return nil
    	}
    
    	var start int64
    	end := int64(-1)
    	for i := 0; i < len(oi.Parts) && i < partNumber; i++ {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Aug 08 15:29:58 UTC 2024
    - 37.1K bytes
    - Viewed (0)
  3. cmd/object-handlers_test.go

    		oinfo, err := obj.GetObjectInfo(context.Background(), bucketName, object, ObjectOptions{})
    		if err != nil {
    			t.Fatalf("Object: %s Object Index %d: Unexpected err: %v", object, oindex, err)
    		}
    
    		rs := partNumberToRangeSpec(oinfo, partNumber)
    		size, err := oinfo.GetActualSize()
    		if err != nil {
    			t.Fatalf("Object: %s Object Index %d: Unexpected err: %v", object, oindex, err)
    		}
    
    		off, length, err := rs.GetOffsetLength(size)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Sep 12 20:10:44 UTC 2024
    - 163.2K bytes
    - Viewed (0)
Back to top