共用方式為


BlobClient.UploadAsync Method

Definition

Overloads

UploadAsync(String, Boolean, CancellationToken)

The UploadAsync(String, CancellationToken) operation creates a new block blob or throws if the blob already exists. Setting overwrite to true allows updating 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 overwrites the contents of the blob, creating a new block blob if none exists. Overwriting an existing block blob replaces any existing metadata on the blob.

Set access conditions through Conditions to avoid overwriting existing data.

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, Boolean, CancellationToken) operation creates a new block blob or throws if the blob already exists. Setting overwrite to true allows updating 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 UploadAsync(Stream, BlobUploadOptions, CancellationToken) operation overwrites the contents of the blob, creating a new block blob if none exists. Overwriting an existing block blob replaces any existing metadata on the blob.

Set access conditions through Conditions to avoid overwriting existing data.

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(BinaryData, Boolean, CancellationToken)

The UploadAsync(BinaryData, Boolean, CancellationToken) operation creates a new block blob or throws if the blob already exists. Setting overwrite to true allows updating 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 throws if the blob already exists.

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 throws if the blob already exists.

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(BinaryData, CancellationToken)

The UploadAsync(BinaryData, CancellationToken) operation creates a new block blob or throws if the blob already exists.

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 throws if the blob already exists.

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 throws an exception if the blob already exists. 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(BinaryData)

The UploadAsync(BinaryData) operation creates a new block blob or throws an exception if the blob already exists. 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(BinaryData, BlobUploadOptions, CancellationToken)

The UploadAsync(BinaryData, BlobUploadOptions, CancellationToken) operation overwrites the contents of the blob, creating a new block blob if none exists. Overwriting an existing block blob replaces any existing metadata on the blob.

Set access conditions through Conditions to avoid overwriting existing data.

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)

Source:
BlobClient.cs
Source:
BlobClient.cs

The UploadAsync(String, CancellationToken) operation creates a new block blob or throws if the blob already exists. Setting overwrite to true allows updating 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

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

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to

UploadAsync(String, BlobUploadOptions, CancellationToken)

Source:
BlobClient.cs
Source:
BlobClient.cs

The UploadAsync(Stream, BlobUploadOptions, CancellationToken) operation overwrites the contents of the blob, creating a new block blob if none exists. Overwriting an existing block blob replaces any existing metadata on the blob.

Set access conditions through Conditions to avoid overwriting existing data.

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

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

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to

UploadAsync(Stream, Boolean, CancellationToken)

Source:
BlobClient.cs
Source:
BlobClient.cs

The UploadAsync(Stream, Boolean, CancellationToken) operation creates a new block blob or throws if the blob already exists. Setting overwrite to true allows updating 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

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

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to

UploadAsync(Stream, BlobUploadOptions, CancellationToken)

Source:
BlobClient.cs
Source:
BlobClient.cs

The UploadAsync(Stream, BlobUploadOptions, CancellationToken) operation overwrites the contents of the blob, creating a new block blob if none exists. Overwriting an existing block blob replaces any existing metadata on the blob.

Set access conditions through Conditions to avoid overwriting existing data.

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

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

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to

UploadAsync(BinaryData, Boolean, CancellationToken)

Source:
BlobClient.cs
Source:
BlobClient.cs

The UploadAsync(BinaryData, Boolean, CancellationToken) operation creates a new block blob or throws if the blob already exists. Setting overwrite to true allows updating 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 (BinaryData content, bool overwrite = false, System.Threading.CancellationToken cancellationToken = default);
abstract member UploadAsync : BinaryData * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>>
override this.UploadAsync : BinaryData * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>>
Public Overridable Function UploadAsync (content As BinaryData, Optional overwrite As Boolean = false, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of BlobContentInfo))

Parameters

content
BinaryData

A BinaryData 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

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

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to

UploadAsync(String, CancellationToken)

Source:
BlobClient.cs
Source:
BlobClient.cs

The UploadAsync(String, CancellationToken) operation creates a new block blob or throws if the blob already exists.

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

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

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to

UploadAsync(Stream, CancellationToken)

Source:
BlobClient.cs
Source:
BlobClient.cs

The UploadAsync(Stream, CancellationToken) operation creates a new block blob or throws if the blob already exists.

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

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

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to

UploadAsync(BinaryData, CancellationToken)

Source:
BlobClient.cs
Source:
BlobClient.cs

The UploadAsync(BinaryData, CancellationToken) operation creates a new block blob or throws if the blob already exists.

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 (BinaryData content, System.Threading.CancellationToken cancellationToken);
abstract member UploadAsync : BinaryData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>>
override this.UploadAsync : BinaryData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>>
Public Overridable Function UploadAsync (content As BinaryData, cancellationToken As CancellationToken) As Task(Of Response(Of BlobContentInfo))

Parameters

content
BinaryData

A BinaryData containing the content to upload.

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

UploadAsync(String)

Source:
BlobClient.cs
Source:
BlobClient.cs

The UploadAsync(String) operation creates a new block blob or throws if the blob already exists.

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

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

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to

UploadAsync(Stream)

Source:
BlobClient.cs
Source:
BlobClient.cs

The UploadAsync(Stream) operation creates a new block blob or throws an exception if the blob already exists. 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

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

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to

UploadAsync(BinaryData)

Source:
BlobClient.cs
Source:
BlobClient.cs

The UploadAsync(BinaryData) operation creates a new block blob or throws an exception if the blob already exists. 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 (BinaryData content);
abstract member UploadAsync : BinaryData -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>>
override this.UploadAsync : BinaryData -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>>
Public Overridable Function UploadAsync (content As BinaryData) As Task(Of Response(Of BlobContentInfo))

Parameters

content
BinaryData

A BinaryData containing the content to upload.

Returns

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

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to

UploadAsync(BinaryData, BlobUploadOptions, CancellationToken)

Source:
BlobClient.cs
Source:
BlobClient.cs

The UploadAsync(BinaryData, BlobUploadOptions, CancellationToken) operation overwrites the contents of the blob, creating a new block blob if none exists. Overwriting an existing block blob replaces any existing metadata on the blob.

Set access conditions through Conditions to avoid overwriting existing data.

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 (BinaryData content, Azure.Storage.Blobs.Models.BlobUploadOptions options, System.Threading.CancellationToken cancellationToken = default);
abstract member UploadAsync : BinaryData * Azure.Storage.Blobs.Models.BlobUploadOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>>
override this.UploadAsync : BinaryData * 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 BinaryData, options As BlobUploadOptions, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of BlobContentInfo))

Parameters

content
BinaryData

A BinaryData containing the content to upload.

options
BlobUploadOptions

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