Stream object responses with known size bounds
This commit is contained in:
@@ -170,7 +170,7 @@ func (b *S3Backend) Read(ctx context.Context, key string) (ObjectInfo, io.ReadCl
|
||||
lastModified = &t
|
||||
}
|
||||
return ObjectInfo{
|
||||
Key: normalizedKey, Size: valueOrZeroInt64(resp.ContentLength),
|
||||
Key: normalizedKey, Size: valueOrZeroInt64(resp.ContentLength), SizeKnown: resp.ContentLength != nil,
|
||||
ETag: strings.Trim(valueOrEmpty(resp.ETag), "\""), LastModified: lastModified,
|
||||
}, resp.Body, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user