BlobBaseClient.DownloadContent Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
DownloadContent() |
The DownloadContent() operation downloads a blob from the service, including its metadata and properties. For more information, see Get Blob. |
DownloadContent(CancellationToken) |
The DownloadContent(CancellationToken) operation downloads a blob from the service, including its metadata and properties. For more information, see Get Blob. |
DownloadContent(BlobDownloadOptions, CancellationToken) |
The DownloadContent(BlobDownloadOptions, CancellationToken) operation downloads a blob from the service, including its metadata and properties. For more information, see Get Blob. |
DownloadContent()
- Source:
- BlobBaseClient.cs
- Source:
- BlobBaseClient.cs
The DownloadContent() operation downloads a blob from the service, including its metadata and properties.
For more information, see Get Blob.
public virtual Azure.Response<Azure.Storage.Blobs.Models.BlobDownloadResult> DownloadContent ();
abstract member DownloadContent : unit -> Azure.Response<Azure.Storage.Blobs.Models.BlobDownloadResult>
override this.DownloadContent : unit -> Azure.Response<Azure.Storage.Blobs.Models.BlobDownloadResult>
Public Overridable Function DownloadContent () As Response(Of BlobDownloadResult)
Returns
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 is a prefered way to fetch blobs that can fit into memory. The content is provided as BinaryData that provides a lightweight abstraction for a payload of bytes. It provides convenient helper methods to get out commonly used primitives, such as streams, strings, or bytes. Consider the following alternatives:
- DownloadTo: to stream blob content to a path or a Stream
- DownloadStreaming: as a replacement to this API. Use it to access network stream directly for any advanced scenario.
Applies to
DownloadContent(CancellationToken)
- Source:
- BlobBaseClient.cs
- Source:
- BlobBaseClient.cs
The DownloadContent(CancellationToken) operation downloads a blob from the service, including its metadata and properties.
For more information, see Get Blob.
public virtual Azure.Response<Azure.Storage.Blobs.Models.BlobDownloadResult> DownloadContent (System.Threading.CancellationToken cancellationToken = default);
abstract member DownloadContent : System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Blobs.Models.BlobDownloadResult>
override this.DownloadContent : System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Blobs.Models.BlobDownloadResult>
Public Overridable Function DownloadContent (Optional cancellationToken As CancellationToken = Nothing) As Response(Of BlobDownloadResult)
Parameters
- cancellationToken
- CancellationToken
Optional CancellationToken to propagate notifications that the operation should be cancelled.
Returns
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 is a prefered way to fetch blobs that can fit into memory. The content is provided as BinaryData that provides a lightweight abstraction for a payload of bytes. It provides convenient helper methods to get out commonly used primitives, such as streams, strings, or bytes. Consider the following alternatives:
- DownloadTo: to stream blob content to a path or a Stream
- DownloadStreaming: as a replacement to this API. Use it to access network stream directly for any advanced scenario.
Applies to
DownloadContent(BlobDownloadOptions, CancellationToken)
- Source:
- BlobBaseClient.cs
- Source:
- BlobBaseClient.cs
The DownloadContent(BlobDownloadOptions, CancellationToken) operation downloads a blob from the service, including its metadata and properties.
For more information, see Get Blob.
public virtual Azure.Response<Azure.Storage.Blobs.Models.BlobDownloadResult> DownloadContent (Azure.Storage.Blobs.Models.BlobDownloadOptions options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member DownloadContent : Azure.Storage.Blobs.Models.BlobDownloadOptions * System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Blobs.Models.BlobDownloadResult>
override this.DownloadContent : Azure.Storage.Blobs.Models.BlobDownloadOptions * System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Blobs.Models.BlobDownloadResult>
Public Overridable Function DownloadContent (Optional options As BlobDownloadOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of BlobDownloadResult)
Parameters
- options
- BlobDownloadOptions
Optional parameters for download operation.
- cancellationToken
- CancellationToken
Optional CancellationToken to propagate notifications that the operation should be cancelled.
Returns
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 is a prefered way to fetch blobs that can fit into memory. The content is provided as BinaryData that provides a lightweight abstraction for a payload of bytes. It provides convenient helper methods to get out commonly used primitives, such as streams, strings, or bytes. Consider the following alternatives:
- DownloadToAsync: to stream blob content to a path or a Stream
- DownloadStreamingAsync: as a replacement to this API. Use it to access network stream directly for any advanced scenario.
Applies to
Azure SDK for .NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기