CloudBlockBlob.UploadFromFileAsync Method (String, FileMode, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to upload a file to a blob. If the blob already exists, it will be overwritten.
Namespace: Microsoft.WindowsAzure.Storage.Blob
Assembly: Microsoft.WindowsAzure.Storage (in Microsoft.WindowsAzure.Storage.dll)
Syntax
[DoesServiceRequestAttribute]
public Task UploadFromFileAsync(
string path,
FileMode mode,
AccessCondition accessCondition,
BlobRequestOptions options,
OperationContext operationContext,
CancellationToken cancellationToken
)
<DoesServiceRequestAttribute>
Public Function UploadFromFileAsync (
path As String,
mode As FileMode,
accessCondition As AccessCondition,
options As BlobRequestOptions,
operationContext As OperationContext,
cancellationToken As CancellationToken
) As Task
Parameters
path
Type: System.StringA string containing the file path providing the blob content.
mode
Type: System.IO.FileModeA FileMode enumeration value that specifies how to open the file.
accessCondition
Type: Microsoft.WindowsAzure.Storage.AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
options
Type: Microsoft.WindowsAzure.Storage.Blob.BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
Type: Microsoft.WindowsAzure.Storage.OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
Type: System.Threading.CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Return Value
Type: System.Threading.Tasks.Task
A Task object that represents the asynchronous operation.
Implements
See Also
UploadFromFileAsync Overload
CloudBlockBlob Class
Microsoft.WindowsAzure.Storage.Blob Namespace
Return to top