CONTENT-MD5 hash of blob is always - in the Azure portal and NULL in code


  • I want to compare local files to Azure Storage blobs using the Content-MD5 hash. But the MD5 hash is always null when downloading the blob (or - on the portal).

    How can I automatically calculate the Contact-MD5 for the already stored items (50TB !) so it is stored with the blob itself (and visible in the portal)

    • Edited by Richard D Wednesday, June 8, 2016 10:30 AM
    Wednesday, June 8, 2016 10:07 AM

All replies

  • Hello Richard,

    It should be visible from the portal and during GET/downloads if a value was previously stored with the blob via a PutBlob, PutBlockList, or SetBlobProperties. For items you have already stored will need to recalculate the MD5 (or if you are sure the local file has not changed use its MD5) and call SetBlobProperties to set it. If you are doing this, you should track the etag for the blob to ensure the blob does not change between the time you read it to the time you set the MD5. In your case I assume you are using MD5 just for checking whether a file in locally has changed since you uploaded by comparing against the MD5 for the cloud copy.

    For a detailed write up please (a bit old) see

    Hope this helps,


    Wednesday, June 8, 2016 8:04 PM