共用方式為


TransferManager.UploadAsync Method

Definition

Overloads

UploadAsync(Stream, CloudBlob, UploadOptions, SingleTransferContext, CancellationToken)

Upload a file to Azure Blob Storage.

UploadAsync(Stream, CloudBlob)

Upload a file to Azure Blob Storage.

UploadAsync(Stream, CloudFile)

Upload a file to Azure File Storage.

UploadAsync(String, CloudBlob)

Upload a file to Azure Blob Storage.

UploadAsync(String, CloudFile)

Upload a file to Azure File Storage.

UploadAsync(Stream, CloudBlob, UploadOptions, SingleTransferContext)

Upload a file to Azure Blob Storage.

UploadAsync(Stream, CloudFile, UploadOptions, SingleTransferContext)

Upload a file to Azure File Storage.

UploadAsync(String, CloudBlob, UploadOptions, SingleTransferContext)

Upload a file to Azure Blob Storage.

UploadAsync(String, CloudFile, UploadOptions, SingleTransferContext)

Upload a file to Azure File Storage.

UploadAsync(Stream, CloudFile, UploadOptions, SingleTransferContext, CancellationToken)

Upload a file to Azure File Storage.

UploadAsync(String, CloudBlob, UploadOptions, SingleTransferContext, CancellationToken)

Upload a file to Azure Blob Storage.

UploadAsync(String, CloudFile, UploadOptions, SingleTransferContext, CancellationToken)

Upload a file to Azure File Storage.

UploadAsync(Stream, CloudBlob, UploadOptions, SingleTransferContext, CancellationToken)

Upload a file to Azure Blob Storage.

public static System.Threading.Tasks.Task UploadAsync (System.IO.Stream sourceStream, Microsoft.Azure.Storage.Blob.CloudBlob destBlob, Microsoft.Azure.Storage.DataMovement.UploadOptions options, Microsoft.Azure.Storage.DataMovement.SingleTransferContext context, System.Threading.CancellationToken cancellationToken);
static member UploadAsync : System.IO.Stream * Microsoft.Azure.Storage.Blob.CloudBlob * Microsoft.Azure.Storage.DataMovement.UploadOptions * Microsoft.Azure.Storage.DataMovement.SingleTransferContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Shared Function UploadAsync (sourceStream As Stream, destBlob As CloudBlob, options As UploadOptions, context As SingleTransferContext, cancellationToken As CancellationToken) As Task

Parameters

sourceStream
Stream

A Stream object providing the file content.

destBlob
CloudBlob

The CloudBlob that is the destination Azure blob.

options
UploadOptions

An UploadOptions object that specifies additional options for the operation.

context
SingleTransferContext

A SingleTransferContext object that represents the context for the current operation.

cancellationToken
CancellationToken

A CancellationToken object to observe while waiting for a task to complete.

Returns

A Task object that represents the asynchronous operation.

Applies to

UploadAsync(Stream, CloudBlob)

Upload a file to Azure Blob Storage.

public static System.Threading.Tasks.Task UploadAsync (System.IO.Stream sourceStream, Microsoft.Azure.Storage.Blob.CloudBlob destBlob);
static member UploadAsync : System.IO.Stream * Microsoft.Azure.Storage.Blob.CloudBlob -> System.Threading.Tasks.Task
Public Shared Function UploadAsync (sourceStream As Stream, destBlob As CloudBlob) As Task

Parameters

sourceStream
Stream

A Stream object providing the file content.

destBlob
CloudBlob

The CloudBlob that is the destination Azure blob.

Returns

A Task object that represents the asynchronous operation.

Applies to

UploadAsync(Stream, CloudFile)

Upload a file to Azure File Storage.

public static System.Threading.Tasks.Task UploadAsync (System.IO.Stream sourceStream, Microsoft.Azure.Storage.File.CloudFile destFile);
static member UploadAsync : System.IO.Stream * Microsoft.Azure.Storage.File.CloudFile -> System.Threading.Tasks.Task
Public Shared Function UploadAsync (sourceStream As Stream, destFile As CloudFile) As Task

Parameters

sourceStream
Stream

A Stream object providing the file content.

destFile
CloudFile

The CloudFile that is the destination Azure file.

Returns

A Task object that represents the asynchronous operation.

Applies to

UploadAsync(String, CloudBlob)

Upload a file to Azure Blob Storage.

public static System.Threading.Tasks.Task UploadAsync (string sourcePath, Microsoft.Azure.Storage.Blob.CloudBlob destBlob);
static member UploadAsync : string * Microsoft.Azure.Storage.Blob.CloudBlob -> System.Threading.Tasks.Task
Public Shared Function UploadAsync (sourcePath As String, destBlob As CloudBlob) As Task

Parameters

sourcePath
String

Path to the source file.

destBlob
CloudBlob

The CloudBlob that is the destination Azure blob.

Returns

A Task object that represents the asynchronous operation.

Applies to

UploadAsync(String, CloudFile)

Upload a file to Azure File Storage.

public static System.Threading.Tasks.Task UploadAsync (string sourcePath, Microsoft.Azure.Storage.File.CloudFile destFile);
static member UploadAsync : string * Microsoft.Azure.Storage.File.CloudFile -> System.Threading.Tasks.Task
Public Shared Function UploadAsync (sourcePath As String, destFile As CloudFile) As Task

Parameters

sourcePath
String

Path to the source file.

destFile
CloudFile

The CloudFile that is the destination Azure file.

Returns

A Task object that represents the asynchronous operation.

Applies to

UploadAsync(Stream, CloudBlob, UploadOptions, SingleTransferContext)

Upload a file to Azure Blob Storage.

public static System.Threading.Tasks.Task UploadAsync (System.IO.Stream sourceStream, Microsoft.Azure.Storage.Blob.CloudBlob destBlob, Microsoft.Azure.Storage.DataMovement.UploadOptions options, Microsoft.Azure.Storage.DataMovement.SingleTransferContext context);
static member UploadAsync : System.IO.Stream * Microsoft.Azure.Storage.Blob.CloudBlob * Microsoft.Azure.Storage.DataMovement.UploadOptions * Microsoft.Azure.Storage.DataMovement.SingleTransferContext -> System.Threading.Tasks.Task
Public Shared Function UploadAsync (sourceStream As Stream, destBlob As CloudBlob, options As UploadOptions, context As SingleTransferContext) As Task

Parameters

sourceStream
Stream

A Stream object providing the file content.

destBlob
CloudBlob

The CloudBlob that is the destination Azure blob.

options
UploadOptions

An UploadOptions object that specifies additional options for the operation.

context
SingleTransferContext

A SingleTransferContext object that represents the context for the current operation.

Returns

A Task object that represents the asynchronous operation.

Applies to

UploadAsync(Stream, CloudFile, UploadOptions, SingleTransferContext)

Upload a file to Azure File Storage.

public static System.Threading.Tasks.Task UploadAsync (System.IO.Stream sourceStream, Microsoft.Azure.Storage.File.CloudFile destFile, Microsoft.Azure.Storage.DataMovement.UploadOptions options, Microsoft.Azure.Storage.DataMovement.SingleTransferContext context);
static member UploadAsync : System.IO.Stream * Microsoft.Azure.Storage.File.CloudFile * Microsoft.Azure.Storage.DataMovement.UploadOptions * Microsoft.Azure.Storage.DataMovement.SingleTransferContext -> System.Threading.Tasks.Task
Public Shared Function UploadAsync (sourceStream As Stream, destFile As CloudFile, options As UploadOptions, context As SingleTransferContext) As Task

Parameters

sourceStream
Stream

A Stream object providing the file content.

destFile
CloudFile

The CloudFile that is the destination Azure file.

options
UploadOptions

An UploadOptions object that specifies additional options for the operation.

context
SingleTransferContext

A SingleTransferContext object that represents the context for the current operation.

Returns

A Task object that represents the asynchronous operation.

Applies to

UploadAsync(String, CloudBlob, UploadOptions, SingleTransferContext)

Upload a file to Azure Blob Storage.

public static System.Threading.Tasks.Task UploadAsync (string sourcePath, Microsoft.Azure.Storage.Blob.CloudBlob destBlob, Microsoft.Azure.Storage.DataMovement.UploadOptions options, Microsoft.Azure.Storage.DataMovement.SingleTransferContext context);
static member UploadAsync : string * Microsoft.Azure.Storage.Blob.CloudBlob * Microsoft.Azure.Storage.DataMovement.UploadOptions * Microsoft.Azure.Storage.DataMovement.SingleTransferContext -> System.Threading.Tasks.Task
Public Shared Function UploadAsync (sourcePath As String, destBlob As CloudBlob, options As UploadOptions, context As SingleTransferContext) As Task

Parameters

sourcePath
String

Path to the source file.

destBlob
CloudBlob

The CloudBlob that is the destination Azure blob.

options
UploadOptions

An UploadOptions object that specifies additional options for the operation.

context
SingleTransferContext

A SingleTransferContext object that represents the context for the current operation.

Returns

A Task object that represents the asynchronous operation.

Applies to

UploadAsync(String, CloudFile, UploadOptions, SingleTransferContext)

Upload a file to Azure File Storage.

public static System.Threading.Tasks.Task UploadAsync (string sourcePath, Microsoft.Azure.Storage.File.CloudFile destFile, Microsoft.Azure.Storage.DataMovement.UploadOptions options, Microsoft.Azure.Storage.DataMovement.SingleTransferContext context);
static member UploadAsync : string * Microsoft.Azure.Storage.File.CloudFile * Microsoft.Azure.Storage.DataMovement.UploadOptions * Microsoft.Azure.Storage.DataMovement.SingleTransferContext -> System.Threading.Tasks.Task
Public Shared Function UploadAsync (sourcePath As String, destFile As CloudFile, options As UploadOptions, context As SingleTransferContext) As Task

Parameters

sourcePath
String

Path to the source file.

destFile
CloudFile

The CloudFile that is the destination Azure file.

options
UploadOptions

An UploadOptions object that specifies additional options for the operation.

context
SingleTransferContext

A SingleTransferContext object that represents the context for the current operation.

Returns

A Task object that represents the asynchronous operation.

Applies to

UploadAsync(Stream, CloudFile, UploadOptions, SingleTransferContext, CancellationToken)

Upload a file to Azure File Storage.

public static System.Threading.Tasks.Task UploadAsync (System.IO.Stream sourceStream, Microsoft.Azure.Storage.File.CloudFile destFile, Microsoft.Azure.Storage.DataMovement.UploadOptions options, Microsoft.Azure.Storage.DataMovement.SingleTransferContext context, System.Threading.CancellationToken cancellationToken);
static member UploadAsync : System.IO.Stream * Microsoft.Azure.Storage.File.CloudFile * Microsoft.Azure.Storage.DataMovement.UploadOptions * Microsoft.Azure.Storage.DataMovement.SingleTransferContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Shared Function UploadAsync (sourceStream As Stream, destFile As CloudFile, options As UploadOptions, context As SingleTransferContext, cancellationToken As CancellationToken) As Task

Parameters

sourceStream
Stream

A Stream object providing the file content.

destFile
CloudFile

The CloudFile that is the destination Azure file.

options
UploadOptions

An UploadOptions object that specifies additional options for the operation.

context
SingleTransferContext

A SingleTransferContext object that represents the context for the current operation.

cancellationToken
CancellationToken

A CancellationToken object to observe while waiting for a task to complete.

Returns

A Task object that represents the asynchronous operation.

Applies to

UploadAsync(String, CloudBlob, UploadOptions, SingleTransferContext, CancellationToken)

Upload a file to Azure Blob Storage.

public static System.Threading.Tasks.Task UploadAsync (string sourcePath, Microsoft.Azure.Storage.Blob.CloudBlob destBlob, Microsoft.Azure.Storage.DataMovement.UploadOptions options, Microsoft.Azure.Storage.DataMovement.SingleTransferContext context, System.Threading.CancellationToken cancellationToken);
static member UploadAsync : string * Microsoft.Azure.Storage.Blob.CloudBlob * Microsoft.Azure.Storage.DataMovement.UploadOptions * Microsoft.Azure.Storage.DataMovement.SingleTransferContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Shared Function UploadAsync (sourcePath As String, destBlob As CloudBlob, options As UploadOptions, context As SingleTransferContext, cancellationToken As CancellationToken) As Task

Parameters

sourcePath
String

Path to the source file.

destBlob
CloudBlob

The CloudBlob that is the destination Azure blob.

options
UploadOptions

An UploadOptions object that specifies additional options for the operation.

context
SingleTransferContext

A SingleTransferContext object that represents the context for the current operation.

cancellationToken
CancellationToken

A CancellationToken object to observe while waiting for a task to complete.

Returns

A Task object that represents the asynchronous operation.

Applies to

UploadAsync(String, CloudFile, UploadOptions, SingleTransferContext, CancellationToken)

Upload a file to Azure File Storage.

public static System.Threading.Tasks.Task UploadAsync (string sourcePath, Microsoft.Azure.Storage.File.CloudFile destFile, Microsoft.Azure.Storage.DataMovement.UploadOptions options, Microsoft.Azure.Storage.DataMovement.SingleTransferContext context, System.Threading.CancellationToken cancellationToken);
static member UploadAsync : string * Microsoft.Azure.Storage.File.CloudFile * Microsoft.Azure.Storage.DataMovement.UploadOptions * Microsoft.Azure.Storage.DataMovement.SingleTransferContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Shared Function UploadAsync (sourcePath As String, destFile As CloudFile, options As UploadOptions, context As SingleTransferContext, cancellationToken As CancellationToken) As Task

Parameters

sourcePath
String

Path to the source file.

destFile
CloudFile

The CloudFile that is the destination Azure file.

options
UploadOptions

An UploadOptions object that specifies additional options for the operation.

context
SingleTransferContext

A SingleTransferContext object that represents the context for the current operation.

cancellationToken
CancellationToken

A CancellationToken object to observe while waiting for a task to complete.

Returns

A Task object that represents the asynchronous operation.

Applies to