In Azure Storage Explorer, I can assign a newline character ('n') to a blob Metadata value without any issues. However, when I call cloudBlockBlob.SetMetadata()
or cloudBlockBlob.SetMetadataAsync()
with a value containing the newline character, it fails.
Someone else reproduced the same issue in this SO thread, but the documentation referenced in one of the comments does not exist anymore.
The current documentation indicates that any ASCII characters should work for Metadata values, and a backslash and 'n' would both be considered valid ASCII characters.
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Hi @TracyGH ,
What specific Azure Storage library version are you using when getting this error message ?
The list of Libraries and newest versions can be found here , Let me know if you are using the latest then i'll route it as a doc/product issue.
Thanks,
Adam
@Adam-Smith-MSFT
Thank you, @TracyGH, I have confirmed with the Azure Storage engineering team that this is a bug in the SDK. They are tracking the issue and will address it in a future release. I'll update this issue once it's fixed.
@Adam-Smith-MSFT - FYI.
@tamram @Adam-Smith-MSFT Adding metadata using CloudBlockBlob.Metadata.Add
also throws exception upon uploading the blob when the value contains any of the following characters:
\r
\n
\r\n
Thanks!
@gojanpaolo - Thank you, I will let the engineering team know.
Most helpful comment
Thank you, @TracyGH, I have confirmed with the Azure Storage engineering team that this is a bug in the SDK. They are tracking the issue and will address it in a future release. I'll update this issue once it's fixed.
@Adam-Smith-MSFT - FYI.
please-close