question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Link to File Upload broken if it contains Exotic Characters

See original GitHub issue

Describe the bug

If files are uploaded with unusual characters such as – (en dash) in the file name, the link for downloading the submission (at least from the student’s perspective) is broken.

To Reproduce

  1. Create a file upload excercise
  2. Upload a file with em dash or other exotic chars and submit
  3. View your Submission
  4. Click on download file
  5. The link should not work

Expected behavior

The submission is shown/downloaded.

Screenshots

image

Environment

Does the download work on… ?

OS Windows 10:

  • Google Chrome (78.0.3904.97) DOES NOT WORK
  • Vivaldi (2.8.1664.40) DOES NOT WORK
  • Firefox (68.0.2) WORKS
  • Microsoft Edge (44.18362.387.0) WORKS

OS Android 9:

  • Google Chrome (78.0.3904.96) DOES NOT WORK
  • Vivaldi (2.7.1624.277) DOES NOT WORK
  • Firefox (68.2.0) WORKS

Additional context

Submission location: artemis.ase.in.tum.de/api/files/file-upload-exercises/769/submissions/452148/Deckblatt–AfI.pdf

This (and maybe some problems connected to this) also happened to some students after submitting their homwork as well as to some tutors grading the homework.

// Updated the system environment details as they are more important than initially thought.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
m1337vcommented, Nov 19, 2019

Update: We got this problem for multiple submissions and were informed by tutors that they could not view or download the file they should review. As we got all submissions from the Artemis team we could check for which submissions/filenames this applies (in the CSV file):

It seems to be affected by a backslash “\”, english dash “—”, hashtag “#” and German Umlaute “äöü”

These can’t be opened at all

i.e. one clicks on “Submission File” it seems to open a new tab but it closes instantly

https://artemis.ase.in.tum.de/#/file-upload-exercise/770/submission/469045/assessment 469045;“/api/files/file-upload-exercises/770/submissions/469045/C:\Users\Baraa\Desktop\PGDP\Syntaxbaum.pdf”;

https://artemis.ase.in.tum.de/#/file-upload-exercise/770/submission/460195/assessment 460195;“/api/files/file-upload-exercises/769/submissions/460195/C:\Users\49151\Desktop\PGDP\Übungsfolien\Scan2019-11-0917.16.03HausaufgabePGDPPinguinreihe.pdf”;

https://artemis.ase.in.tum.de/#/file-upload-exercise/770/submission/439091/assessment 439091;“/api/files/file-upload-exercises/770/submissions/439091/C:\Users\erick\Documents\TUM\5.Semester\PGdP\Syntaxbaumwurzel.pdf”;

https://artemis.ase.in.tum.de/#/file-upload-exercise/770/submission/460189/assessment 460189;“/api/files/file-upload-exercises/770/submissions/460189/C:\Users\49151\Desktop\PGDP\Übungsfolien\Scan2019-11-0917.09.14HausaufgabePGDPSynthaxbaum.pdf”;

https://artemis.ase.in.tum.de/#/file-upload-exercise/770/submission/469040/assessment 469040;“/api/files/file-upload-exercises/769/submissions/469040/C:\Users\Baraa\Desktop\PGDP\Pinguinreihen.pdf”;

https://artemis.ase.in.tum.de/#/file-upload-exercise/769/submission/439099/assessment 439099;“/api/files/file-upload-exercises/769/submissions/439099/C:\Users\erick\Documents\TUM\5.Semester\PGdP\Niugnip.jpg”;

https://artemis.ase.in.tum.de/#/file-upload-exercise/769/submission/414483/assessment 414483;“/api/files/file-upload-exercises/769/submissions/414483/C:\Users\laeti\Desktop\UNI\pgdp\Pinguinreihe.jpg”;

Here at least a new Tab is opened

but the “website cannot be reached” error is shown along with the url

https://artemis.ase.in.tum.de/#/file-upload-exercise/770/submission/467771/assessment 467771;“/api/files/file-upload-exercises/769/submissions/467771/Aufgabe-w03-h02—Pinguinreihen.pdf”

https://artemis.ase.in.tum.de/#/file-upload-exercise/770/submission/460464/assessment https://artemis.ase.in.tum.de/api/files/file-upload-exercises/769/submissions/460464/Woche03H02PinguinreihenGrubmüller.pdf

https://artemis.ase.in.tum.de/#/file-upload-exercise/770/submission/458638/assessment https://artemis.ase.in.tum.de/api/files/file-upload-exercises/769/submissions/458638/PinguinReihe-RegulärerAusdruck.pdf

https://artemis.ase.in.tum.de/#/file-upload-exercise/770/submission/427447/assessment https://artemis.ase.in.tum.de/api/files/file-upload-exercises/769/submissions/427447/Woche03H02-Pinguinreihen-NiklasClüsserath.pdf

https://artemis.ase.in.tum.de/#/file-upload-exercise/770/submission/443229/assessment 443229;https://artemis.ase.in.tum.de/api/files/file-upload-exercises/769/submissions/443229/PGDPWoche03Hausaufgabe02–ReguläreAusdrücke.pdf

Here one gets a 401 Api error

https://artemis.ase.in.tum.de/#/file-upload-exercise/770/submission/454407/assessment 454407;“/api/files/file-upload-exercises/770/submissions/454407/syntaxBaumAbgabe#.PNG”; {“type”:“https://www.jhipster.tech/problem/problem-with-message",“title”:“Unauthorized”,“status”:401,“detail”:"Full authentication is required to access this resource”,“path”:“/api/files/file-upload-exercises/770/submissions/454407/syntaxBaumAbgabe”,“message”:“error.http.401”}

0reactions
kruschecommented, Nov 22, 2019

I get the same error, but I do not understand why. I tested it again locally and on our test server and it works correctly in Chrome. It might be an encoding problem. Maybe the file was uploaded on a Windows machine with a different encoding than our server is used to and now the problematic ä is differently encoded.

The good thing is, in the future there won’t be such problem because we replace such characters.

Would be great if you can use Firefox in such cases for now, because it would be really hard for us to fix the problem

Read more comments on GitHub >

github_iconTop Results From Across the Web

FileUpload Issues With File Names Containing Special ...
I have a FileUpload control which allows users to upload documents and pictures and then link to them in fields. This is working...
Read more >
error when uploading/syncing a file with special characters
I've recently installed ownCloud with the latest available docker image, set it up and configured it to use an external storage (Strato HiDrive) ......
Read more >
How to format URLs that have special characters in the filename.
If you upload a file named "image 1.jpg" and attempt to link to it using the following URL - http://cacheflyusername.cachefly.net/image 1.jpg ...
Read more >
Upload file with special character - Alfresco Hub
In alfresco I've got problème to upload certain file when they have special characers. Some file withn "éèô" can't be uploaded.
Read more >
Java : How to accommodate special characters in the filename ...
I have a file which I upload, during this process the link of the file is stored in the database and not the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found