Upload of image with accent in the filename is failing

AI-generated summary

Uploading images with accents in the filename is failing. gzoritchak demonstrated the issue by uploading a file named “écran.png”, which failed, but succeeded when renamed to “ecran.png”. This problem affects users with non-English filenames, such as default screen capture filenames on French Macs. Matthieu pointed out that the issue also occurs with spaces in the filename. codinghorror and codinghorror acknowledged the bug and assigned it to zogstrip or eviltrout to fix. A fix has been implemented by zogstrip and is available in this commit.

The demo below. The same image is uploaded twice.

The first time the name of the file is “écran.png”. At the end of the upload the link is not updated. The file was uploaded (you can check in the original directory).

Uploading écran.png…

After changing the name from “écran.png” to “ecran.png”. The upload is working.

It’s a problem for many countries. By default a screen copy file name on a french mac is “Capture d’écran 2015-mm-DD à HH:MM:SS.png”.

3 « J'aime »

Looks like a bug for you @zogstrip.

Same here, but for it seems it is more due to the space in the filename:

BTW it also does not work on meta.discourse ^^ I have had to rename the file.

1 « J'aime »

Yeah we should definitely fix this as well @zogstrip or @eviltrout.

Thanks for reporting that issue. Here’s the fix :banana:

https://github.com/discourse/discourse/commit/af7f00099ff9541f0b4dba5771d824bcd2d9efd5

5 « J'aime »

This topic was automatically closed after 6 hours. New replies are no longer allowed.