DeviceClient.UploadToBlobAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
UploadToBlobAsync(String, Stream) |
Obsolete.
Uploads a stream to a block blob in a storage account associated with the IoTHub for that device. If the blob already exists, it will be overwritten. |
UploadToBlobAsync(String, Stream, CancellationToken) |
Obsolete.
Uploads a stream to a block blob in a storage account associated with the IoTHub for that device. If the blob already exists, it will be overwritten. |
UploadToBlobAsync(String, Stream)
Caution
This API has been split into three APIs: GetFileUploadSasUri, uploading to blob directly using the Azure Storage SDK, and CompleteFileUploadAsync
Uploads a stream to a block blob in a storage account associated with the IoTHub for that device. If the blob already exists, it will be overwritten.
[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
Parameters
- blobName
- String
The name of the blob to upload.
- source
- Stream
A stream with blob contents. Should be disposed after upload completes.
Returns
AsncTask
- Attributes
Applies to
UploadToBlobAsync(String, Stream, CancellationToken)
Caution
This API has been split into three APIs: GetFileUploadSasUri, uploading to blob directly using the Azure Storage SDK, and CompleteFileUploadAsync
Uploads a stream to a block blob in a storage account associated with the IoTHub for that device. If the blob already exists, it will be overwritten.
[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
Parameters
- blobName
- String
The name of the blob to upload
- source
- Stream
A stream with blob contents.. Should be disposed after upload completes.
- cancellationToken
- CancellationToken
A cancellation token to cancel the operation.
Returns
The task to await
- Attributes
Exceptions
Thrown when the operation has been canceled.
Applies to
Azure SDK for .NET