I have this for a bonus question and can't seem to find something it will not accept!
If the assignment is set to accept only certain file types and you try to upload a different type that is not accepted, you'll get a message from Canvas saying it is not allowed:
Make sure that you have the file type restrictions set correctly, such as extensions separated by commas with no periods. Here's how the settings look for the above assignment, which only allows Excel .xlsx spreadsheet files:
Is this bonus question inside a quiz? If so, then there is not a way to limit it to just certain filetypes. Mike's approach works well when the is it a standalone assignment and not part of a quiz.
If you are using New Quizzes, then there is the ability to restrict file types on a file upload question. This lesson from the Canvas Instructor Guide explains how: 4152,790511
Strangely, the example for new quizzes does show the dot in the extension, but Mike is right about submission restrictions not wanting the dot.
Retrieving data ...