instructure / canvas-lms

The open LMS by Instructure, Inc.
https://github.com/instructure/canvas-lms/wiki
GNU Affero General Public License v3.0
5.45k stars 2.44k forks source link

Text files with .sql extension not downloadable with macOS safari #2110

Open willcohen opened 1 year ago

willcohen commented 1 year ago

Summary:

Steps to reproduce:

  1. Upload a .sql text file to a Canvas course and add it to a module.
  2. As a student or instructor, in macOS Safari, open that file for viewing via the module and attempt to download
  3. 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:

Screen Shot 2022-10-14 at 2 14 27 PM

Additional notes:

willcohen commented 1 year ago

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.

itsTurner commented 8 months ago

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.