BlobClient.UploadAsync Method

Definition

Overloads

UploadAsync(String, Boolean, CancellationToken)

The UploadAsync(String, CancellationToken) operation creates a new block blob or updates the content of an existing block blob. Updating an existing block blob overwrites any existing metadata on the blob.

For partial block blob updates and other advanced features, please see BlockBlobClient. To create or modify page or append blobs, please see PageBlobClient or AppendBlobClient.

For more information, see Put Blob.

UploadAsync(String, BlobUploadOptions, CancellationToken)

The UploadAsync(Stream, BlobUploadOptions, CancellationToken) operation creates a new block blob or updates the content of an existing block blob. Updating an existing block blob overwrites any existing metadata on the blob.

For partial block blob updates and other advanced features, please see BlockBlobClient. To create or modify page or append blobs, please see PageBlobClient or AppendBlobClient.

For more information, see Put Blob..

UploadAsync(Stream, Boolean, CancellationToken)

The UploadAsync(Stream, CancellationToken) operation creates a new block blob or updates the content of an existing block blob. Updating an existing block blob overwrites any existing metadata on the blob.

For partial block blob updates and other advanced features, please see BlockBlobClient. To create or modify page or append blobs, please see PageBlobClient or AppendBlobClient.

For more information, see Put Blob.

UploadAsync(String, CancellationToken)

The UploadAsync(String, CancellationToken) operation creates a new block blob or updates the content of an existing block blob. Updating an existing block blob overwrites any existing metadata on the blob.

For partial block blob updates and other advanced features, please see BlockBlobClient. To create or modify page or append blobs, please see PageBlobClient or AppendBlobClient.

For more information, see Put Blob.

UploadAsync(Stream, CancellationToken)

The UploadAsync(Stream, CancellationToken) operation creates a new block blob or updates the content of an existing block blob. Updating an existing block blob overwrites any existing metadata on the blob.

For partial block blob updates and other advanced features, please see BlockBlobClient. To create or modify page or append blobs, please see PageBlobClient or AppendBlobClient.

For more information, see Put Blob.

UploadAsync(String)

The UploadAsync(String) operation creates a new block blob or updates the content of an existing block blob. Updating an existing block blob overwrites any existing metadata on the blob.

For partial block blob updates and other advanced features, please see BlockBlobClient. To create or modify page or append blobs, please see PageBlobClient or AppendBlobClient.

For more information, see Put Blob.

UploadAsync(Stream)

The UploadAsync(Stream) operation creates a new block blob or updates the content of an existing block blob. Updating an existing block blob overwrites any existing metadata on the blob.

For partial block blob updates and other advanced features, please see BlockBlobClient. To create or modify page or append blobs, please see PageBlobClient or AppendBlobClient.

For more information, see Put Blob.

UploadAsync(Stream, BlobUploadOptions, CancellationToken)

The Azure.Storage.Blobs.BlobClient.UploadAsync(System.IO.Stream,Azure.Storage.Blobs.Models.BlobHttpHeaders,System.Collections.Generic.IDictionary{System.String,System.String},Azure.Storage.Blobs.Models.BlobRequestConditions,System.IProgress{System.Int64},System.Nullable{Azure.Storage.Blobs.Models.AccessTier},Azure.Storage.StorageTransferOptions,System.Threading.CancellationToken) operation creates a new block blob or updates the content of an existing block blob. Updating an existing block blob overwrites any existing metadata on the blob.

For partial block blob updates and other advanced features, please see BlockBlobClient. To create or modify page or append blobs, please see PageBlobClient or AppendBlobClient.

For more information, see Put Blob.

UploadAsync(String, Boolean, CancellationToken)

The UploadAsync(String, CancellationToken) operation creates a new block blob or updates the content of an existing block blob. Updating an existing block blob overwrites any existing metadata on the blob.

For partial block blob updates and other advanced features, please see BlockBlobClient. To create or modify page or append blobs, please see PageBlobClient or AppendBlobClient.

For more information, see Put Blob.

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

Parameters

path
String

A file path containing the content to upload.

overwrite
Boolean

Whether the upload should overwrite any existing blobs. 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.

UploadAsync(String, BlobUploadOptions, CancellationToken)

The UploadAsync(Stream, BlobUploadOptions, CancellationToken) operation creates a new block blob or updates the content of an existing block blob. Updating an existing block blob overwrites any existing metadata on the blob.

For partial block blob updates and other advanced features, please see BlockBlobClient. To create or modify page or append blobs, please see PageBlobClient or AppendBlobClient.

For more information, see Put Blob..

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

Parameters

path
String

A file path containing the content to upload.

options
BlobUploadOptions

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.

UploadAsync(Stream, Boolean, CancellationToken)

The UploadAsync(Stream, CancellationToken) operation creates a new block blob or updates the content of an existing block blob. Updating an existing block blob overwrites any existing metadata on the blob.

For partial block blob updates and other advanced features, please see BlockBlobClient. To create or modify page or append blobs, please see PageBlobClient or AppendBlobClient.

For more information, see Put Blob.

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

Parameters

content
Stream

A Stream containing the content to upload.

overwrite
Boolean

Whether the upload should overwrite any existing blobs. 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.

UploadAsync(String, CancellationToken)

The UploadAsync(String, CancellationToken) operation creates a new block blob or updates the content of an existing block blob. Updating an existing block blob overwrites any existing metadata on the blob.

For partial block blob updates and other advanced features, please see BlockBlobClient. To create or modify page or append blobs, please see PageBlobClient or AppendBlobClient.

For more information, see Put Blob.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>> UploadAsync (string path, System.Threading.CancellationToken cancellationToken);
abstract member UploadAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>>
override this.UploadAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>>
Public Overridable Function UploadAsync (path As String, cancellationToken As CancellationToken) As Task(Of Response(Of BlobContentInfo))

Parameters

path
String

A file path containing the content to upload.

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.

UploadAsync(Stream, CancellationToken)

The UploadAsync(Stream, CancellationToken) operation creates a new block blob or updates the content of an existing block blob. Updating an existing block blob overwrites any existing metadata on the blob.

For partial block blob updates and other advanced features, please see BlockBlobClient. To create or modify page or append blobs, please see PageBlobClient or AppendBlobClient.

For more information, see Put Blob.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>> UploadAsync (System.IO.Stream content, System.Threading.CancellationToken cancellationToken);
abstract member UploadAsync : System.IO.Stream * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>>
override this.UploadAsync : System.IO.Stream * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>>
Public Overridable Function UploadAsync (content As Stream, cancellationToken As CancellationToken) As Task(Of Response(Of BlobContentInfo))

Parameters

content
Stream

A Stream containing the content to upload.

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.

UploadAsync(String)

The UploadAsync(String) operation creates a new block blob or updates the content of an existing block blob. Updating an existing block blob overwrites any existing metadata on the blob.

For partial block blob updates and other advanced features, please see BlockBlobClient. To create or modify page or append blobs, please see PageBlobClient or AppendBlobClient.

For more information, see Put Blob.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>> UploadAsync (string path);
abstract member UploadAsync : string -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>>
override this.UploadAsync : string -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>>
Public Overridable Function UploadAsync (path As String) As Task(Of Response(Of BlobContentInfo))

Parameters

path
String

A file path containing the content to upload.

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.

UploadAsync(Stream)

The UploadAsync(Stream) operation creates a new block blob or updates the content of an existing block blob. Updating an existing block blob overwrites any existing metadata on the blob.

For partial block blob updates and other advanced features, please see BlockBlobClient. To create or modify page or append blobs, please see PageBlobClient or AppendBlobClient.

For more information, see Put Blob.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>> UploadAsync (System.IO.Stream content);
abstract member UploadAsync : System.IO.Stream -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>>
override this.UploadAsync : System.IO.Stream -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>>
Public Overridable Function UploadAsync (content As Stream) As Task(Of Response(Of BlobContentInfo))

Parameters

content
Stream

A Stream containing the content to upload.

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.

UploadAsync(Stream, BlobUploadOptions, CancellationToken)

The Azure.Storage.Blobs.BlobClient.UploadAsync(System.IO.Stream,Azure.Storage.Blobs.Models.BlobHttpHeaders,System.Collections.Generic.IDictionary{System.String,System.String},Azure.Storage.Blobs.Models.BlobRequestConditions,System.IProgress{System.Int64},System.Nullable{Azure.Storage.Blobs.Models.AccessTier},Azure.Storage.StorageTransferOptions,System.Threading.CancellationToken) operation creates a new block blob or updates the content of an existing block blob. Updating an existing block blob overwrites any existing metadata on the blob.

For partial block blob updates and other advanced features, please see BlockBlobClient. To create or modify page or append blobs, please see PageBlobClient or AppendBlobClient.

For more information, see Put Blob.

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

Parameters

content
Stream

A Stream containing the content to upload.

options
BlobUploadOptions

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