CloudFile.UploadFromFileAsync Method (String, FileMode, CancellationToken)
Returns a task that performs an asynchronous operation to upload a local file to the File service. If the file already exists on the service, it will be overwritten.
Namespace: Microsoft.WindowsAzure.Storage.File
Assembly: Microsoft.WindowsAzure.Storage (in Microsoft.WindowsAzure.Storage.dll)
Syntax
[DoesServiceRequestAttribute]
public Task UploadFromFileAsync(
string path,
FileMode mode,
CancellationToken cancellationToken
)
<DoesServiceRequestAttribute>
Public Function UploadFromFileAsync (
path As String,
mode As FileMode,
cancellationToken As CancellationToken
) As Task
Parameters
path
Type: System.StringThe file providing the file content.
mode
Type: System.IO.FileModeA constant that determines how to open the file.
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 current operation.
See Also
UploadFromFileAsync Overload
CloudFile Class
Microsoft.WindowsAzure.Storage.File Namespace
Return to top