Invalid character exception when adding Metadata to a CloudBlob

前端 未结 4 1573
南方客
南方客 2021-01-01 15:59

Task

Upload a file to Azure Blob Storage with the original filename and also assign the filename as meta-data to the CloudBlob

4条回答
  •  伪装坚强ぢ
    2021-01-01 16:52

    Just have had confirmation from the azure-sdk-for-net team on GitHub that only ASCII characters are valid as data within blob meta-data.

    joeg commented:
    The supported characters in the blob metadata must be ASCII characters. To work around this you can either escape the string ( percent encode), base64 encode etc.

    Source on GitHub

    So as a work-around, either:

    • escape the string (percent encode), base64 encode, etc, as suggested by joeg
    • use the techniques that I have mentioned in my other answer.

提交回复
热议问题