共用方式為


ShareFileClient.UploadRangeFromUri Method

Definition

The UploadRangeFromUri(Uri, HttpRange, HttpRange, ShareFileUploadRangeFromUriOptions, CancellationToken) operation writes a range from an Azure File to another Azure file. This API is supported only for version 2019-02-02 and higher.

public virtual Azure.Response<Azure.Storage.Files.Shares.Models.ShareFileUploadInfo> UploadRangeFromUri (Uri sourceUri, Azure.HttpRange range, Azure.HttpRange sourceRange, Azure.Storage.Files.Shares.Models.ShareFileUploadRangeFromUriOptions options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member UploadRangeFromUri : Uri * Azure.HttpRange * Azure.HttpRange * Azure.Storage.Files.Shares.Models.ShareFileUploadRangeFromUriOptions * System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Files.Shares.Models.ShareFileUploadInfo>
override this.UploadRangeFromUri : Uri * Azure.HttpRange * Azure.HttpRange * Azure.Storage.Files.Shares.Models.ShareFileUploadRangeFromUriOptions * System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Files.Shares.Models.ShareFileUploadInfo>
Public Overridable Function UploadRangeFromUri (sourceUri As Uri, range As HttpRange, sourceRange As HttpRange, Optional options As ShareFileUploadRangeFromUriOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of ShareFileUploadInfo)

Parameters

sourceUri
Uri

Required. Specifies the URL of the source file, up to 2 KB in length. If source is an Azure blob or Azure file, it must either be public or must be authenticated via a shared access signature. If the source is public, no authentication is required to perform the operation.

range
HttpRange

Specifies the range of bytes to be written. Both the start and end of the range must be specified.

sourceRange
HttpRange

Specifies the range of bytes to be written from. Both the start and end of the range must be specified.

cancellationToken
CancellationToken

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

Returns

A Response<T> describing the state of the file.

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to