共用方式為


BlockBlobClient.SyncUploadFromUri Method

Definition

Overloads

SyncUploadFromUri(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.

SyncUploadFromUri(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.

SyncUploadFromUri(Uri, Boolean, CancellationToken)

Source:
BlockBlobClient.cs
Source:
BlockBlobClient.cs

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 Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo> SyncUploadFromUri (Uri copySource, bool overwrite = false, System.Threading.CancellationToken cancellationToken = default);
abstract member SyncUploadFromUri : Uri * bool * System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>
override this.SyncUploadFromUri : Uri * bool * System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>
Public Overridable Function SyncUploadFromUri (copySource As Uri, Optional overwrite As Boolean = false, Optional cancellationToken As CancellationToken = Nothing) As 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. Source Blob Authentication

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

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

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to

SyncUploadFromUri(Uri, BlobSyncUploadFromUriOptions, CancellationToken)

Source:
BlockBlobClient.cs
Source:
BlockBlobClient.cs

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 Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo> SyncUploadFromUri (Uri copySource, Azure.Storage.Blobs.Models.BlobSyncUploadFromUriOptions options, System.Threading.CancellationToken cancellationToken = default);
abstract member SyncUploadFromUri : Uri * Azure.Storage.Blobs.Models.BlobSyncUploadFromUriOptions * System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>
override this.SyncUploadFromUri : Uri * Azure.Storage.Blobs.Models.BlobSyncUploadFromUriOptions * System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>
Public Overridable Function SyncUploadFromUri (copySource As Uri, options As BlobSyncUploadFromUriOptions, Optional cancellationToken As CancellationToken = Nothing) As 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. Source Blob Authentication

options
BlobSyncUploadFromUriOptions

Optional parameters.

cancellationToken
CancellationToken

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

Returns

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

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to