Skip to content

Expose blob size through BlobProvider's Open method #1223

@aaronlehmann

Description

@aaronlehmann

Currently, fetching a blob while providing a progress bar is a two-step process:

  • Call Stat to verify that the blob exists and determine the size
  • Call Open to get a ReadSeekCloser that provides the blob data

The HEAD request that Stat performs here seems to be redundant, since the same information could be gathered from Open's GET status code and Content-Length header. However, Open currently doesn't expose the Content-Length. Doing so could save a round trip. Perhaps this could be done by having Open also return a Descriptor, or creating another variant of Open which does, if returning the descriptor imposes some extra for certain implementations.

cc @dmp42

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions