你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
DeviceClient.UploadToBlobAsync 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
UploadToBlobAsync(String, Stream) |
已过时.
将流上传到与该设备的 IoTHub 关联的存储帐户中的块 Blob。 如果 Blob 已存在,则会覆盖该 Blob。 |
UploadToBlobAsync(String, Stream, CancellationToken) |
已过时.
将流上传到与该设备的 IoTHub 关联的存储帐户中的块 Blob。 如果 Blob 已存在,则会覆盖该 Blob。 |
UploadToBlobAsync(String, Stream)
注意
This API has been split into three APIs: GetFileUploadSasUri, uploading to blob directly using the Azure Storage SDK, and CompleteFileUploadAsync
将流上传到与该设备的 IoTHub 关联的存储帐户中的块 Blob。 如果 Blob 已存在,则会覆盖该 Blob。
[System.Obsolete("This API has been split into three APIs: GetFileUploadSasUri, uploading to blob directly using the Azure Storage SDK, and CompleteFileUploadAsync")]
public System.Threading.Tasks.Task UploadToBlobAsync (string blobName, System.IO.Stream source);
[<System.Obsolete("This API has been split into three APIs: GetFileUploadSasUri, uploading to blob directly using the Azure Storage SDK, and CompleteFileUploadAsync")>]
member this.UploadToBlobAsync : string * System.IO.Stream -> System.Threading.Tasks.Task
Public Function UploadToBlobAsync (blobName As String, source As Stream) As Task
参数
- blobName
- String
要上传的 Blob 的名称。
- source
- Stream
包含 Blob 内容的流。 上传完成后应释放。
返回
AsncTask
- 属性
适用于
UploadToBlobAsync(String, Stream, CancellationToken)
注意
This API has been split into three APIs: GetFileUploadSasUri, uploading to blob directly using the Azure Storage SDK, and CompleteFileUploadAsync
将流上传到与该设备的 IoTHub 关联的存储帐户中的块 Blob。 如果 Blob 已存在,则会覆盖该 Blob。
[System.Obsolete("This API has been split into three APIs: GetFileUploadSasUri, uploading to blob directly using the Azure Storage SDK, and CompleteFileUploadAsync")]
public System.Threading.Tasks.Task UploadToBlobAsync (string blobName, System.IO.Stream source, System.Threading.CancellationToken cancellationToken);
[<System.Obsolete("This API has been split into three APIs: GetFileUploadSasUri, uploading to blob directly using the Azure Storage SDK, and CompleteFileUploadAsync")>]
member this.UploadToBlobAsync : string * System.IO.Stream * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function UploadToBlobAsync (blobName As String, source As Stream, cancellationToken As CancellationToken) As Task
参数
- blobName
- String
要上传的 Blob 的名称
- source
- Stream
包含 Blob 内容的流。 上传完成后应释放。
- cancellationToken
- CancellationToken
用于取消操作的取消标记。
返回
要等待的任务
- 属性
例外
取消操作时引发。