Skip to content
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

Downloading attachments have wrong filenames (Unicode) #4465

tomohikosan opened this issue May 24, 2020 · 2 comments · Fixed by #4466

Downloading attachments have wrong filenames (Unicode) #4465

tomohikosan opened this issue May 24, 2020 · 2 comments · Fixed by #4466


Copy link

tomohikosan commented May 24, 2020

Describe the bug
Files uploaded with the material editor do not preserve their filenames when downloaded, if they include (non-ASCII) unicode characters.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Material Editor'
  2. Upload file with filename (for example) 'TEST日本語123.txt'
  3. Go to the event page, right-click and download the file above.
  4. The downloaded file has a filename 'TEST123.txt', which is different from the original.

Expected behavior
In the example above, the downloaded filename should be 'TEST日本語123.txt' instead of 'TEST123.txt'.

Here is a screenshot of how the file looks in the agenda page (it is correct here):


This shows that, at least in this intermediate step, the filename seems to be properly stored.
However, the actual URL to the file (and therefore how the web browser saves the file) does not have the correct filename.

Here is a screenshot of the web browser pointing to the file:


Additional context

  • This behavior was seen at
  • Uploading seems to be working fine, since the internal representation shows the correct filename.
  • It seems the generation of the download link alters the filename.
  • It seems the non-ASCII characters get omitted.
Copy link

ThiefMaster commented May 24, 2020

We currently strip all non-ascii characters from filenames because back when writing this code a few years ago, browser support for unicode filenames wasn't as good as it is now, so it was the right thing to do.

However, you are right that we should start sending the original filename when downloading a file, and I could have sworn that I created an issue for this a few months ago when implementing this for another case where users can upload files... anyway, now that you created one we have one. :)

@ThiefMaster ThiefMaster added this to the v2.3 milestone May 24, 2020
@ThiefMaster ThiefMaster added this to To do in Release 2.3 via automation May 24, 2020
Copy link

tomohikosan commented May 24, 2020

Thank you very much for the quick response!

Release 2.3 automation moved this from To do to Done May 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
No open projects
Release 2.3

Successfully merging a pull request may close this issue.

2 participants