instructure / canvas-lms

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

.JPEG and .JPG are Treated as Different File Types When Restricting Assignment's Upload File Types #2301

Closed NateLevin1 closed 5 months ago

NateLevin1 commented 5 months ago

Summary:

When a student tries to submit a .JPG to an assignment that has been restricted to only .JPEGs, the student is blocked from doing so. Because both of these file extensions are used to represent the same image format, either should be allowed. Teachers should not have to remember to always add jpeg and jpg every time they want to allow an assignment to be submitted with the JPEG image format.

Steps to reproduce:

  1. Create a new assignment
  2. Choose a Submission Type of "File Uploads"
  3. Check off Restrict Upload File Types
  4. Under "Allowed File Extensions", add in jpeg
  5. Go to submit the assignment as a student account
  6. Attempt to upload a file with the .jpg extension

Expected behavior:

The .jpg is uploaded & submitted.

Actual behavior:

Canvas prevents the user from uploading their submission.

Additional notes:

See also: JPG vs. JPEG: Is There a Difference?

maths22 commented 5 months ago

Canvas does not intend to maintain a list of all file extensions that are equivalent for all file types. While we could make a special-case for jpg/jpeg, we are not going to do this at this time.