Unable to upload files to Atmos Clouds (EMC/ATT) using certain Russian special charaters in filename. Sample files attached.
Would appreciate any pointers to API documentation of supported special characters and/or filename limitations.
I'm able to create objects on Atmos Online, our developer sandbox, using those files.
There's a section in the Atmos Programmer's Guide titled "Namespace file name rules" that discusses URL encoding the URI and other considerations.
How are you trying to upload the files to AT&T?
Unicode characters in paths must be URL escaped when sending a request. This should happen *after* the signature has been generated (so the signature is on the actual UTF-8 bytes). Also be sure to lowercase the entire path when signing. This may be tricky if you're doing it manually using codepages, but most languages take care of this for you.
Our SDKs and utilities all take care of this automatically. Please note that if you're using AtmosFox, you need version 1.2, which may not have been reviewed by Mozilla, so it doesn't appear as the "latest version". You can find it here:
Thanks Raj & Chris. Here is more detailed info: As explained on page 15 of Atmos Programmer's Guide, we are using Listable User Metadata (x-emc-listable-tags) for easy indexing, searching and retrieval of objects.
page 25 decribes usage of x-emc-listable-tags.
Used in responses to return listable metadata tags for an object
(which are set with the
SPECIAL CHARACTERS: if a metadata tag name
contains a character that is not in the iso-8859-1
character set, that character is replaced with a
question mark (?) character for display purposes. For
example, consider a metadata tag name Beta
(containing the Greek letter Beta). The Beta Character
may not be sent as a HTTP header, so it is replaced in
the returned list as follows:x-emc-tags: mykey1, mykey2, ?eta
It seems like the x-emc-listable-tags can contain only iso-8859-1 character set and not UTF8. Since we are using the filename as metadata, setting a special character text in this headers is throwing an error. Do you concur with this?
Your original post implied you were using the namespace API, whose paths are specified in the URL itself. Tags/metadata are specified in headers. To enable unicode support in metadata, URL-encode the metadata name and value (if present) and add the following header:
Do this *before* signing the request.
Sorry for delay in responding as holidays/other things got in way.
Adding the -emc-utf8-true did help in uploading files.
Problem now is that the Folder wa created but without x-emc-listable-met.
As you can see in attached file, Metadata- objectname and listable metadata is missing for special character folders.
Any thoughts much appreciated. Thanks in advance.
You also need to specify x-emc-utf8=true in READ requests for objects that have Unicode metadata. This header tells Atmos to URL-encode the characters since non-latin characters are not supported in HTTP headers. So you will need to URL-decode the metadata names and values from the response.
The tool you're using does not appear to do that.
If x-emc-utf8=true is not present, then Atmos will return the x-emc-unencodable-meta header, listing all the metadata tags that have non-latin characters in them (and thus cannot be sent without encoding).
I'm also adding support for Atmos filename special character in our product.Objects have unicode metadata. Hence I added the header x-emc-utf8:true. But from the time I added this header I'm getting "ATMOS_MISMATCH_SIGNATURE". Did I miss out anything? Can you please let me know what needs to be taken care in the code when this header is added?
If non-latin characters are in the metadata, URL-encode the metadata names and values BEFORE signing the request. Then sign the request. If non-latin characters are in the URL path, URL-encode those AFTER signing the request (make sure they are lower-cased when signing).