BlobTransferClient.UploadBlob Method (Uri, String, FileEncryption, CancellationToken, CloudBlobClient, RetryPolicy)

Uploads file to a blob storage.

Namespace:  Microsoft.WindowsAzure.MediaServices.Client
Assembly:  Microsoft.WindowsAzure.MediaServices.Client (in Microsoft.WindowsAzure.MediaServices.Client.dll)

public Task UploadBlob(
	Uri url,
	string localFile,
	FileEncryption fileEncryption,
	CancellationToken cancellationToken,
	CloudBlobClient client,
	RetryPolicy retryPolicy


Type: System.Uri
The URL where file needs to be uploaded. If blob has private write permissions then appropriate SAS URL need to be passed.
Type: System.String
The full path of local file.
Type: Microsoft.WindowsAzure.MediaServices.Client.FileEncryption
The file encryption if file needs to be stored encrypted. Pass null if no encryption required.
Type: System.Threading.CancellationToken
The cancellation token.
Type: CloudBlobClient
The client which will be used to upload file. Use client if request need to be signed with client credentials. When upload performed using SAS URL, then client can be null.
Type: RetryPolicy
The RetryPolicy delegate returns a ShouldRetry delegate, which can be used to implement a custom retry policy. RetryPolicies class can be used to get default policies.

Return Value

Type: System.Threading.Tasks.Task
A function delegate that returns the future result to be available through the Task.

Community Additions