-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SyntaxError with accentuated filenames #32
Comments
My bad, I'm pretty sure it's because I don't escape them while getting the signed url from my server ... |
Must be this line that is failing. There must be restrictions on the encoding of characters for setting headers or something (I'm really not sure). Looks like this StackOverflow question says that only US-ASCII characters are allowed. I went looking at the jquery source code to see if they do anything special when setting request headers, and here where they take in the headers, and here where they set them, neither does any encoding. You could try to Thanks. |
http://stackoverflow.com/a/22935139/2726340 Thanks |
Probably would need a PR for this. Just need to do some extra work on this line: https://github.com/odysseyscience/react-s3-uploader/blob/master/s3upload.js#L63 |
Library from this SO answer : http://stackoverflow.com/a/9667817/2726340 I added a normalize() call to be sure about the encoding. On my mac, it appears that my filenames were in NFD, the library was in UTF8, so nothing was matched. Now it seems to be working fine. Don't hesitate to make changements if necessary of course. PR from issue odysseyscience#32
Pushed |
Hi guys,
It seems that I have a problem with accentuated filenames (here,
3ème_étage.JPG
, 🇫🇷 people ... 😁 )I don't quite know where to start. Is this react-s3-uploader related ? Or does it come from my Rails server ?
Thanks for the awesome work. We're rolling it in production in a few days :)
The error :
The text was updated successfully, but these errors were encountered: