Condividi tramite


ShareFileClient.UploadRangeAsync Method

Definition

The Azure.Storage.Files.Shares.ShareFileClient.UploadRangeAsync(Azure.HttpRange,System.IO.Stream,System.Byte[],System.IProgress{System.Int64},Azure.Storage.Files.Shares.Models.ShareFileRequestConditions,System.Threading.CancellationToken) operation writes content to a range of a file.

For more information, see Put Range.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.Shares.Models.ShareFileUploadInfo>> UploadRangeAsync (Azure.HttpRange range, System.IO.Stream content, Azure.Storage.Files.Shares.Models.ShareFileUploadRangeOptions options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member UploadRangeAsync : Azure.HttpRange * System.IO.Stream * Azure.Storage.Files.Shares.Models.ShareFileUploadRangeOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.Shares.Models.ShareFileUploadInfo>>
override this.UploadRangeAsync : Azure.HttpRange * System.IO.Stream * Azure.Storage.Files.Shares.Models.ShareFileUploadRangeOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.Shares.Models.ShareFileUploadInfo>>
Public Overridable Function UploadRangeAsync (range As HttpRange, content As Stream, Optional options As ShareFileUploadRangeOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of ShareFileUploadInfo))

Parameters

range
HttpRange

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

content
Stream

A Stream containing the content of the range to upload.

options
ShareFileUploadRangeOptions

Optional parameters.

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