Topic: [Bug] Can't upload image with japanese characters in url

Posted under Site Bug Reports & Feature Requests

Bug overview description.
I'm not sure if this is the real cause of the bug, but it is the only thing I noticed is different from the normal.

When uploading an image that contains japanese characters, an error is given and the upload does not happen.

What part(s) of the site page(s) are affected?
Both upload pages: https://e621.net/post/upload and https://e621.net/post/upload?use_new=true

What is the expected behavior?
To upload correctly.

What actual behavior is given instead?
An HTTP error.

Time of incident (if applicable).

Can you reproduce the bug every time?
Yes, every time.

What steps did you take to replicate this bug?
Go to the upload form, choose the upload from URL field, and put this image: http://d.facdn.net/art/uleez/1561742614/1561742592.uleez_%E7%8F%8D%E7%8F%A0%E5%A5%B6%E8%8C%B6.jpg

Errors or other messages returned (if any).
When upload the following message is given:

Error: Source couldn't be opened: HTTP error code: 404 Not Found

Updated

URLs cannot have special non-ASCII characters in them, in this case "珍珠奶茶" (which is Chinese btw).
Thus, whenever you copy a link with them they will get percent-encoded. This is why sometimes you will see spaces as "%20" in links.
This will happen to other languages as well, like Russian Cyrillic in the URL.

Chrome will automatically decode them so that you can open it in new tabs without any problems; however, e6 will not automatically decode them for you if you were to paste them as such into the URL field.

A simple workaround is to just download the image and then manually upload it.
Or if you really want to use direct link, then just open the link in a new tab, copy the part that is percent-encoded and replace them in the URL field.

For example

1. Copied and pasted link appears as http://d.facdn.net/art/uleez/1561742614/1561742592.uleez_%E7%8F%8D%E7%8F%A0%E5%A5%B6%E8%8C%B6.jpg

2. Open link in new tab and manually highlight and copy the decoded "珍珠奶茶" part.

3. Replace the all the "%E7...%B6" part with "珍珠奶茶" so that it now appears as
http://d.facdn.net/art/uleez/1561742614/1561742592.uleez_珍珠奶茶.jpg

4. Click upload and it shouldn't return a 404 error.

Updated by anonymous

TheGreatWolfgang said:
"珍珠奶茶" (which is Chinese btw).
[/section]

Oof, you are right.

I ended up manually uploading it, but I replacing the URL is good idea to remember.

Maybe in the future the forms could encode whatever you are trying to send on the URL field?

Updated by anonymous

  • 1