TransferManagerUploadAsync Method (String, CloudFile, UploadOptions, SingleTransferContext, CancellationToken) |
Upload a file to Azure File Storage.
Namespace:
Microsoft.Azure.Storage.DataMovement
Assembly:
Microsoft.Azure.Storage.DataMovement (in Microsoft.Azure.Storage.DataMovement.dll) Version: 2.0.1.0 (2.0.1.0)
Syntax public static Task UploadAsync(
string sourcePath,
CloudFile destFile,
UploadOptions options,
SingleTransferContext context,
CancellationToken cancellationToken
)
Public Shared Function UploadAsync (
sourcePath As String,
destFile As CloudFile,
options As UploadOptions,
context As SingleTransferContext,
cancellationToken As CancellationToken
) As Task
public:
static Task^ UploadAsync(
String^ sourcePath,
CloudFile^ destFile,
UploadOptions^ options,
SingleTransferContext^ context,
CancellationToken cancellationToken
)
static member UploadAsync :
sourcePath : string *
destFile : CloudFile *
options : UploadOptions *
context : SingleTransferContext *
cancellationToken : CancellationToken -> Task
Parameters
- sourcePath
- Type: SystemString
Path to the source file. - destFile
- Type: CloudFile
The CloudFile that is the destination Azure file. - options
- Type: Microsoft.Azure.Storage.DataMovementUploadOptions
An UploadOptions object that specifies additional options for the operation. - context
- Type: Microsoft.Azure.Storage.DataMovementSingleTransferContext
A SingleTransferContext object that represents the context for the current operation. - cancellationToken
- Type: System.ThreadingCancellationToken
A CancellationToken object to observe while waiting for a task to complete.
Return Value
Type:
TaskA
Task object that represents the asynchronous operation.
See Also