1
votes

I'm uploading files in AZURE blob storage using azure-storage java sdk version 8.6.5. If I upload a file from Web Console, I see Content-MD5 value.

But I do not see CONTENT-MD5 value when I upload using the following sample code :-

BlobRequestOptions blobRequestOptions = new BlobRequestOptions();
blobRequestOptions.setStoreBlobContentMD5(true);  
cloudBlockBlob.uploadBlock(blockId, inputstream , length, null, blobRequestOptions, null);

File is split into multiple chunks and uploaded in multiple parallel threads and finally committing the block list as follows. File upload is working fine.

cloudBlockBlob.commitBlockList(blockIds, null, blobRequestOptions, null);

Any pointers would be greatly appreciated, thanks!

Also any ideas what is the best way to check the file integrity programmatically and to ensure file is uploaded correctly if content-MD5 is not available. Does Azure blob Storage support any thing for content verification?

1

1 Answers

1
votes

If you want to get CONTENT-MD5 value after you have uploaded a file successfully,just try the code below :

cloudBlockBlob.getProperties().getContentMD5()

If you are still missing the content-MD5 value, this link could be helpful.