go-cloud icon indicating copy to clipboard operation
go-cloud copied to clipboard

blob: allow access attributes along with read in a single request

Open breezewish opened this issue 5 months ago • 0 comments
trafficstars

Please use a title starting with the name of the affected package, or "all", followed by a colon, followed by a short summary of the feature request. Example: blob/gcsblob: add support for more blobbing.

Is your feature request related to a problem? Please describe.

Now, if you want to read the attribute, and the data, you must:

  1. Use Bucket.NewReader() to read data
  2. Use Bucket.Attributes() to read attributes

So there are two requests (get and head).

Describe the solution you'd like

Allow access attributes (especially user attributes) directly in blob.Reader. This saves one roundtrip time, and less requests. Actually S3 API allows read out the object as well as the metadata.

Describe alternatives you've considered

None

Additional context

None

breezewish avatar Jun 06 '25 05:06 breezewish