Replacing tags on files with public ids containing non-ascii characters
In Java, when attempting to update the tags on a file with a public id containing non-ascii characters...
e.g. local/Doc1è_uvvv4m.txt
using uploader.replaceTag(...)
where 'uploader' is a suitably configured com.cloudinary.Uploader object,
an exception is raised with the following message...
Server returned unexpected status code - 401 - {"error":{"message":"Invalid Signature bf37bf408dd9fa67f57274bf97c91db169e5ff7a. String to sign - 'command=replace&public_ids=local/Doc1\u00e8_uvvv4m.txt&tag=year_2015,document×tamp=1445598113'."}}
Note: The code works fine for public_ids containing only ascii characters.
Do I need to somehow escape the public id(s) passed in?
I attempted using a UnicodeEscaper to translate the public id to
local/Doc1\u00e8_uvvv4m.txt
as shown in the error message. Doing this, the exception was not raised but the tags were not updated either.
Thanks.
-
Hi, there was a known issue with older versions of the Java library. Please upgrade to the latest version.
0 -
Thanks for your response.
Apparently, according to a colleague, we had logged this same issue a while ago and, as suggested at the time, had updated to 1.2.0 to fix it.
We subsequently updated to 1.2.1 and it appears that this caused the problem to return.
For your info however, we have just updated to 1.2.2 and it does indeed fix the issue (again).
0
Post is closed for comments.
Comments
2 comments