Reputation: 714
I only find a code on adding metadata to a blob in this link
But there is not documentation of how to edit the blob's metadata
Is Azure.Storage.Blob dont have a way to modify the blob's metadata?
Upvotes: 3
Views: 3794
Reputation: 122
SetMetadata and SetMetadataAsync will overwrite any existing value of a property that you have set in the past.
You can therefore either directly overwrite with a new value, or use GetMetadata(Async) first to retrieve the existing value, edit it, and then write it back using SetMetadata(Async).
You pass in an IDictionary to SetMetadata with the keys and values you want to set.
Any properties not set in your IDictionary will remain untouched on the blob.
Upvotes: 5