canvas-lms
canvas-lms copied to clipboard
Text files with .sql extension not downloadable with macOS safari
Summary:
Steps to reproduce:
- Upload a .sql text file to a Canvas course and add it to a module.
- As a student or instructor, in macOS Safari, open that file for viewing via the module and attempt to download
- Look at what gets downloaded by Safari.
Expected behavior:
The original .sql file uploaded to Canvas should be in the downloads folder, just like what happens with Firefox and Chrome.
Actual behavior:
A file called true.html downloads instead, with the following content:

Additional notes:
As a workaround, right clicking on the link and opening in a new tab does cause safari to download it correctly, but this is not self-evident to students.
Hey, Will!
I've been having the same behavior with .tex files on Safari 15.6.1.
I wonder if this comes from the download attribute directed to a separate download URL – is there precent for this functionality in Safari differing from Firefox or Chrome?
Does anyone have hints as to where this might be coming from? Would love to work on a solution.