BlockBlobClient.SyncUploadFromUriAsync Method

Definition

Overloads

SyncUploadFromUriAsync(Uri, BlobSyncUploadFromUriOptions, CancellationToken)

The Upload from Uri operation creates a new Block Blob where the contents of the blob are read from a given URL. This API is supported beginning with the 2020-04-08 version.

Partial updates are not supported with Put Blob from URL; the content of an existing blob is overwritten with the content of the new blob. To perform partial updates to a block blob’s contents using a source URL, use the Put Block from URL API in conjunction with Put Block List.

SyncUploadFromUriAsync(Uri, Boolean, CancellationToken)

The Upload from Uri operation creates a new Block Blob where the contents of the blob are read from a given URL. This API is supported beginning with the 2020-04-08 version.

Partial updates are not supported with Put Blob from URL; the content of an existing blob is overwritten with the content of the new blob. To perform partial updates to a block blob’s contents using a source URL, use the Put Block from URL API in conjunction with Put Block List.

SyncUploadFromUriAsync(Uri, BlobSyncUploadFromUriOptions, CancellationToken)

The Upload from Uri operation creates a new Block Blob where the contents of the blob are read from a given URL. This API is supported beginning with the 2020-04-08 version.

Partial updates are not supported with Put Blob from URL; the content of an existing blob is overwritten with the content of the new blob. To perform partial updates to a block blob’s contents using a source URL, use the Put Block from URL API in conjunction with Put Block List.

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

Parameters

copySource
Uri

Required. Specifies the URL of the source blob. The source blob may be of any type, including a block blob, append blob, or page blob. The value may be a URL of up to 2 KiB in length that specifies a blob. The value should be URL-encoded as it would appear in a request URI. The source blob must either be public or must be authorized via a shared access signature. If the source blob is public, no authorization is required to perform the operation.

options
BlobSyncUploadFromUriOptions

Optional parameters.

cancellationToken
CancellationToken

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

Returns

Task<Response<BlobContentInfo>>

A Response<T> describing the state of the updated block blob.

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to

SyncUploadFromUriAsync(Uri, Boolean, CancellationToken)

The Upload from Uri operation creates a new Block Blob where the contents of the blob are read from a given URL. This API is supported beginning with the 2020-04-08 version.

Partial updates are not supported with Put Blob from URL; the content of an existing blob is overwritten with the content of the new blob. To perform partial updates to a block blob’s contents using a source URL, use the Put Block from URL API in conjunction with Put Block List.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>> SyncUploadFromUriAsync (Uri copySource, bool overwrite = false, System.Threading.CancellationToken cancellationToken = default);
abstract member SyncUploadFromUriAsync : Uri * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>>
override this.SyncUploadFromUriAsync : Uri * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>>
Public Overridable Function SyncUploadFromUriAsync (copySource As Uri, Optional overwrite As Boolean = false, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of BlobContentInfo))

Parameters

copySource
Uri

Required. Specifies the URL of the source blob. The source blob may be of any type, including a block blob, append blob, or page blob. The value may be a URL of up to 2 KiB in length that specifies a blob. The value should be URL-encoded as it would appear in a request URI. The source blob must either be public or must be authorized via a shared access signature. If the source blob is public, no authorization is required to perform the operation.

overwrite
Boolean

Whether the upload should overwrite the existing blob. The default value is false.

cancellationToken
CancellationToken

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

Returns

Task<Response<BlobContentInfo>>

A Response<T> describing the state of the updated block blob.

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to