你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
TransferManager.UploadAsync 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
UploadAsync(Stream, CloudBlob, UploadOptions, SingleTransferContext, CancellationToken) |
将文件上传到Azure Blob 存储。 |
UploadAsync(Stream, CloudBlob) |
将文件上传到Azure Blob 存储。 |
UploadAsync(Stream, CloudFile) |
将文件上传到 Azure 文件存储。 |
UploadAsync(String, CloudBlob) |
将文件上传到Azure Blob 存储。 |
UploadAsync(String, CloudFile) |
将文件上传到 Azure 文件存储。 |
UploadAsync(Stream, CloudBlob, UploadOptions, SingleTransferContext) |
将文件上传到Azure Blob 存储。 |
UploadAsync(Stream, CloudFile, UploadOptions, SingleTransferContext) |
将文件上传到 Azure 文件存储。 |
UploadAsync(String, CloudBlob, UploadOptions, SingleTransferContext) |
将文件上传到Azure Blob 存储。 |
UploadAsync(String, CloudFile, UploadOptions, SingleTransferContext) |
将文件上传到 Azure 文件存储。 |
UploadAsync(Stream, CloudFile, UploadOptions, SingleTransferContext, CancellationToken) |
将文件上传到 Azure 文件存储。 |
UploadAsync(String, CloudBlob, UploadOptions, SingleTransferContext, CancellationToken) |
将文件上传到Azure Blob 存储。 |
UploadAsync(String, CloudFile, UploadOptions, SingleTransferContext, CancellationToken) |
将文件上传到 Azure 文件存储。 |
UploadAsync(Stream, CloudBlob, UploadOptions, SingleTransferContext, CancellationToken)
将文件上传到Azure Blob 存储。
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
参数
- options
- UploadOptions
一个 UploadOptions 对象,该对象指定操作的其他选项。
- context
- SingleTransferContext
一个 SingleTransferContext 对象,表示当前操作的上下文。
- cancellationToken
- CancellationToken
等待 CancellationToken 任务完成时要观察的对象。
返回
表示异步操作的 Task 对象。
适用于
UploadAsync(Stream, CloudBlob)
将文件上传到Azure Blob 存储。
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
参数
返回
表示异步操作的 Task 对象。
适用于
UploadAsync(Stream, CloudFile)
将文件上传到 Azure 文件存储。
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
参数
返回
表示异步操作的 Task 对象。
适用于
UploadAsync(String, CloudBlob)
将文件上传到Azure Blob 存储。
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
参数
- sourcePath
- String
源文件的路径。
返回
表示异步操作的 Task 对象。
适用于
UploadAsync(String, CloudFile)
将文件上传到 Azure 文件存储。
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
参数
- sourcePath
- String
源文件的路径。
返回
表示异步操作的 Task 对象。
适用于
UploadAsync(Stream, CloudBlob, UploadOptions, SingleTransferContext)
将文件上传到Azure Blob 存储。
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
参数
- options
- UploadOptions
一个 UploadOptions 对象,该对象指定操作的其他选项。
- context
- SingleTransferContext
一个 SingleTransferContext 对象,表示当前操作的上下文。
返回
表示异步操作的 Task 对象。
适用于
UploadAsync(Stream, CloudFile, UploadOptions, SingleTransferContext)
将文件上传到 Azure 文件存储。
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
参数
- options
- UploadOptions
一个 UploadOptions 对象,该对象指定操作的其他选项。
- context
- SingleTransferContext
一个 SingleTransferContext 对象,表示当前操作的上下文。
返回
表示异步操作的 Task 对象。
适用于
UploadAsync(String, CloudBlob, UploadOptions, SingleTransferContext)
将文件上传到Azure Blob 存储。
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
参数
- sourcePath
- String
源文件的路径。
- options
- UploadOptions
一个 UploadOptions 对象,该对象指定操作的其他选项。
- context
- SingleTransferContext
一个 SingleTransferContext 对象,表示当前操作的上下文。
返回
表示异步操作的 Task 对象。
适用于
UploadAsync(String, CloudFile, UploadOptions, SingleTransferContext)
将文件上传到 Azure 文件存储。
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
参数
- sourcePath
- String
源文件的路径。
- options
- UploadOptions
一个 UploadOptions 对象,该对象指定操作的其他选项。
- context
- SingleTransferContext
一个 SingleTransferContext 对象,表示当前操作的上下文。
返回
表示异步操作的 Task 对象。
适用于
UploadAsync(Stream, CloudFile, UploadOptions, SingleTransferContext, CancellationToken)
将文件上传到 Azure 文件存储。
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
参数
- options
- UploadOptions
一个 UploadOptions 对象,该对象指定操作的其他选项。
- context
- SingleTransferContext
一个 SingleTransferContext 对象,表示当前操作的上下文。
- cancellationToken
- CancellationToken
等待 CancellationToken 任务完成时要观察的对象。
返回
表示异步操作的 Task 对象。
适用于
UploadAsync(String, CloudBlob, UploadOptions, SingleTransferContext, CancellationToken)
将文件上传到Azure Blob 存储。
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
参数
- sourcePath
- String
源文件的路径。
- options
- UploadOptions
一个 UploadOptions 对象,该对象指定操作的其他选项。
- context
- SingleTransferContext
一个 SingleTransferContext 对象,表示当前操作的上下文。
- cancellationToken
- CancellationToken
等待 CancellationToken 任务完成时要观察的对象。
返回
表示异步操作的 Task 对象。
适用于
UploadAsync(String, CloudFile, UploadOptions, SingleTransferContext, CancellationToken)
将文件上传到 Azure 文件存储。
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
参数
- sourcePath
- String
源文件的路径。
- options
- UploadOptions
一个 UploadOptions 对象,该对象指定操作的其他选项。
- context
- SingleTransferContext
一个 SingleTransferContext 对象,表示当前操作的上下文。
- cancellationToken
- CancellationToken
等待 CancellationToken 任务完成时要观察的对象。
返回
表示异步操作的 Task 对象。