TransferManager.UploadAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
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
- 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
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
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.
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.
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
- 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
- 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.
- 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.
- 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
- 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.
- 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.
- 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.