fix submitting files to assignments with extension restrictions

test plan:
* create an assignment with a file upload submission type
 and file types restricted (e.g. to .doc files)
* as a student, try to submit an already uploaded file
 to the assignment
* should not fail

closes #CNVS-16400

Change-Id: I8882e6dea533836cf7bc0f8c03e7d806c33c66c1
Reviewed-on: https://gerrit.instructure.com/45390
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>