Azure-docs: SetMetadata/SetMetadataAsync do not allow newline characters ('\n')

Created on 25 Apr 2019  Â·  5Comments  Â·  Source: MicrosoftDocs/azure-docs

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.


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

assigned-to-author cxp doc-bug storagsvc triaged

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

All 5 comments

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

image

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

@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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Agazoth picture Agazoth  Â·  3Comments

bdcoder2 picture bdcoder2  Â·  3Comments

JamesDLD picture JamesDLD  Â·  3Comments

paulmarshall picture paulmarshall  Â·  3Comments

Favna picture Favna  Â·  3Comments