Reputation: 127
I'm uploading some files with some different special characters to the blob. It is not getting uploaded. I found that there is some restriction on naming the files of the azure. So I need the list of unsupported unicode characters for blob file names or way to find whether a character is supported in azure blob file name or not.
I had referred below doc on this. They didnt provide any particular list or way to find it. https://learn.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-shares--directories--files--and-metadata
I need the exact validation of file name validation happening on upload file blade on azure blob
Upvotes: 4
Views: 18546
Reputation: 13
The characters not recommended in blob names are clearly listed here:https://learn.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata#unicode-characters-not-recommended-for-use-in-container-or-blob-names
Upvotes: 0
Reputation: 54089
I don't think the Microsoft Docs are very precisely specified.
A blob name must conforming to the following naming rules:
In my tests I found you cannot have these characters in an Azure Blob name
I used the Azure Blob go SDK for doing these tests, so it is possible some of these limitations are due to that.
Upvotes: 5
Reputation: 6467
Here is the correct document: https://learn.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata#blob-names
A blob name must conforming to the following naming rules:
A blob name can contain any combination of characters.
A blob name must be at least one character long and cannot be more than 1,024 characters long, for blobs in Azure Storage.
The Azure Storage emulator supports blob names up to 256 characters long. For more information, see Use the Azure storage emulator for development and testing.
Blob names are case-sensitive.
Reserved URL characters must be properly escaped.
The number of path segments comprising the blob name cannot exceed 254. A path segment is the string between consecutive delimiter characters (e.g., the forward slash '/') that corresponds to the name of a virtual directory.
Note: Avoid blob names that end with a dot (.), a forward slash (/), or a sequence or combination of the two.
The Blob service is based on a flat storage scheme, not a hierarchical scheme. However, you may specify a character or string delimiter within a blob name to create a virtual hierarchy. For example, the following list shows valid and unique blob names. Notice that a string can be valid as both a blob name and as a virtual directory name in the same container:
/a
/a.txt
/a/b
/a/b.txt
You can take advantage of the delimiter character when enumerating blobs.
Note: the doc that was mentioned in your question is for Azure File Storage rather than Azure Blob Storage, so it's not the correct one.
Upvotes: 0