kxmbrian/coursemology.org — pull request #6 by fonglh (2014-12-30 01:41:58+00:00)
Title: Constrain upload file types for scribing questions.

Only allow GIF, PNG, JPEG image files to be uploaded, in addition to PDF
files.

Downcase content type before checking.

If file is of an invalid type, redirect to new scribing question page
and display an error flash notice.

Switch order of check of file_save_success so spurious questions won't
be created when file upload fails.

References Coursemology/coursemology.org#277