ShareFileClient.UploadRangeFromUriAsync Method

Definition

The Azure.Storage.Files.Shares.ShareFileClient.UploadRangeFromUriAsync(System.Uri,Azure.HttpRange,Azure.HttpRange,Azure.Storage.Files.Shares.Models.ShareFileRequestConditions,System.Threading.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 System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.Shares.Models.ShareFileUploadInfo>> UploadRangeFromUriAsync (Uri sourceUri, Azure.HttpRange range, Azure.HttpRange sourceRange, Azure.Storage.Files.Shares.Models.ShareFileUploadRangeFromUriOptions options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member UploadRangeFromUriAsync : Uri * Azure.HttpRange * Azure.HttpRange * Azure.Storage.Files.Shares.Models.ShareFileUploadRangeFromUriOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.Shares.Models.ShareFileUploadInfo>>
override this.UploadRangeFromUriAsync : Uri * Azure.HttpRange * Azure.HttpRange * Azure.Storage.Files.Shares.Models.ShareFileUploadRangeFromUriOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.Shares.Models.ShareFileUploadInfo>>
Public Overridable Function UploadRangeFromUriAsync (sourceUri As Uri, range As HttpRange, sourceRange As HttpRange, Optional options As ShareFileUploadRangeFromUriOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of 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