I have successfully used this feature to upload files to a storage container in Azure blob storage. I wanted to ask if this form of file upload has the same integrity checks using MD5 hash as there is with normal blob storage uploading. This link describes that feature for blob storage. Also, it seems this check is optional, if so, is there a way for me to ensure that this happens when I upload from my iot device using the azure-iot-sdk's.
Asked
Active
Viewed 404 times
1 Answers
0
I have tested this issue with Azure IoT SDK for CSharp. When uploading the file to azure iot hub, I uses fiddler to catch the http request. Actually, the headers in the request contains Content-MD5
. So if you use Azure IoT SDK for CSharp, you need not to check the option for MD5. And you can refer to the method UploadFromStreamAsync in Microsoft Azure Storage SDK for .NET, this method is called when upload file via UploadFromStreamAsync method.
Update:
MD5 cannot be calculated for an existing blob because it would require reading the existing data. Please disable storeBlobContentMD5.

Michael Xu
- 4,382
- 1
- 8
- 16
-
Is this the same for the c SDK? – radish25 Jul 31 '18 at 11:31
-
No, it is different with C SDK. You can run the sample iothub_client_sample_upload_to_blob and then check the content-md5. You need to implement that yourself. – Michael Xu Aug 01 '18 at 08:32
-
@radish25, is any other question about that? Feel free let me know. – Michael Xu Aug 03 '18 at 07:02