Reputation: 17530
I am wondering if somehow the MD5 properties for blobs could get currupted over time when doing file copies.
Is there any rest calls to make blobs recalculate its md5 property?
I am using cloud berry and i have had issues before with it and starting to wonder if theres actually a bug in it. I seem to get more and more
Microsoft.WindowsAzure.Storage.StorageException: Calculated MD5 does not match existing property
when downloading files with the c# azure storage nuget package. and the only changes made to files is some copies from one storage account to another manually with cloudberry. Are anyone else seeing similar problems?
Upvotes: 2
Views: 1354
Reputation: 136196
Is there any rest calls to make blobs recalculate its md5 property?
As far as I know, there's no REST API calls to recalculate the MD5 property of the blob. What you could do is calculate the MD5 based on blob's data and update MD5 property of the blob.
Microsoft.WindowsAzure.Storage.StorageException: Calculated MD5 does not match existing property
You can actually bypass this error by using the following code:
BlobRequestOptions options = new BlobRequestOptions()
{
DisableContentMD5Validation = true,
};
blockBlob.DownloadToStream(memoryStream, null, options);
More on this here: Azure Storage Calculated MD5 does not match existing property.
So the approach for you would be to download the blob contents first using the code above, recalculate MD5 of the content and update blob's properties by specifying the new MD5.
I haven't used Cloudberry so I can't really comment if it has any issues. I would suggest reaching out to them on their support forums.
Upvotes: 1