Checksum verification not working when uploading using stageBlock/commitBlockList or when using blobClient.getBlockBlobClient().getBlobOutputStream
Hi, I would like to perform checksum verfication after I upload large file via stageBlock/commitBlockList or via blobClient.getBlockBlobClient().getBlobOutputStream(BlockBlobOutputStreamOptions) I tried to set the checksum in commitBlock but the checksum verfication doesn't affect only set the md5 in the blob. I tried to set the md5 in blobHttpHeaders of the BlockBlobOutputStreamOptions without success. Is there any option do perfrom checksum verfication on server side when uploading via stageBlock/commitBlockList or via getBlobOutputStream The checksum is saved in the blob but no verification is done. Thanks, Itay
@ibrahimrabab @ibrandes @seanmcc-msft
Thank you for your feedback. Tagging and routing to the team member best able to assist.
Hi, Is there any solution to my issue? Thanks, Itay
Any updates?
Any updates?
Hi @ihudedi Thanks for reaching out! Apologies for not being able to respond to your question earlier. You can use checksum verification when uploading using stageBlock() or upload() while setting the contentMd5 parameter on either BlockBlobStageBlockOptions for stageBlock or BlockBlobSimpleUploadOptions for upload. How are you trying to trying to upload and verify the checksum? Can you provide a code snippet of how you are doing the checksum verification? Also, what SDK version are you using?
Hi @ibrahimrabab When uploading using stageblock and commitblocklist the checksum is being verified per block uploading and not per all file.when I upload the file as one chunk and not in chunks ( bliboutputoptions or stage block ) I can't verify checksum for whole file.its working fine when I upload file via upload() Thanks, Itay
@ihudedi By design, the way stageBlock and commitBlockList work is that it will verify per chunk uploaded. MD5 cannot be calculated for the entire file, it would be calculated for uploaded chunk. For your scenario, using upload() will be the best option so that you will be able to upload the entire file and calculate the checksum together.
Hi @ihudedi If your issue is resolved, we can go ahead and close this issue. If you have any further questions please let us know!