BlobBaseClient.DownloadStreamingAsync Method

Definition

Overloads

DownloadStreamingAsync(HttpRange, BlobRequestConditions, Boolean, CancellationToken)

The DownloadStreamingAsync(HttpRange, BlobRequestConditions, Boolean, CancellationToken) operation downloads a blob from the service, including its metadata and properties.

For more information, see Get Blob.

DownloadStreamingAsync(BlobDownloadOptions, CancellationToken)

The DownloadStreamingAsync(BlobDownloadOptions, CancellationToken) operation downloads a blob from the service, including its metadata and properties.

For more information, see Get Blob.

DownloadStreamingAsync(HttpRange, BlobRequestConditions, Boolean, CancellationToken)

The DownloadStreamingAsync(HttpRange, BlobRequestConditions, Boolean, CancellationToken) operation downloads a blob from the service, including its metadata and properties.

For more information, see Get Blob.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobDownloadStreamingResult>> DownloadStreamingAsync (Azure.HttpRange range = default, Azure.Storage.Blobs.Models.BlobRequestConditions conditions = default, bool rangeGetContentHash = false, System.Threading.CancellationToken cancellationToken = default);
abstract member DownloadStreamingAsync : Azure.HttpRange * Azure.Storage.Blobs.Models.BlobRequestConditions * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobDownloadStreamingResult>>
override this.DownloadStreamingAsync : Azure.HttpRange * Azure.Storage.Blobs.Models.BlobRequestConditions * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobDownloadStreamingResult>>
Public Overridable Function DownloadStreamingAsync (Optional range As HttpRange = Nothing, Optional conditions As BlobRequestConditions = Nothing, Optional rangeGetContentHash As Boolean = false, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of BlobDownloadStreamingResult))

Parameters

range
HttpRange

If provided, only download the bytes of the blob in the specified range. If not provided, download the entire blob.

conditions
BlobRequestConditions

Optional BlobRequestConditions to add conditions on downloading this blob.

rangeGetContentHash
Boolean

When set to true and specified together with the range, the service returns the MD5 hash for the range, as long as the range is less than or equal to 4 MB in size. If this value is specified without range or set to true when the range exceeds 4 MB in size, a RequestFailedException is thrown.

cancellationToken
CancellationToken

Optional CancellationToken to propagate notifications that the operation should be cancelled.

Returns

Task<Response<BlobDownloadStreamingResult>>

A Response<T> describing the downloaded blob. Content contains the blob's data.

Remarks

A RequestFailedException will be thrown if a failure occurs.

This API gives access directly to network stream that should be disposed after usage. Consider the following alternatives:

  • DownloadContentAsyncas a prefered way of downloading small blobs that can fit into memory
  • DownloadToAsyncto stream blob content to a path or a Stream

Applies to

DownloadStreamingAsync(BlobDownloadOptions, CancellationToken)

The DownloadStreamingAsync(BlobDownloadOptions, CancellationToken) operation downloads a blob from the service, including its metadata and properties.

For more information, see Get Blob.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobDownloadStreamingResult>> DownloadStreamingAsync (Azure.Storage.Blobs.Models.BlobDownloadOptions options, System.Threading.CancellationToken cancellationToken = default);
abstract member DownloadStreamingAsync : Azure.Storage.Blobs.Models.BlobDownloadOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobDownloadStreamingResult>>
override this.DownloadStreamingAsync : Azure.Storage.Blobs.Models.BlobDownloadOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobDownloadStreamingResult>>
Public Overridable Function DownloadStreamingAsync (options As BlobDownloadOptions, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of BlobDownloadStreamingResult))

Parameters

options
BlobDownloadOptions

Optional parameters.

cancellationToken
CancellationToken

Returns

Task<Response<BlobDownloadStreamingResult>>

A Response<T> describing the downloaded blob. Content contains the blob's data.

Remarks

A RequestFailedException will be thrown if a failure occurs.

This API gives access directly to network stream that should be disposed after usage. Consider the following alternatives:

  • DownloadContentAsyncas a prefered way of downloading small blobs that can fit into memory
  • DownloadToAsyncto stream blob content to a path or a Stream

Applies to