-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
4.0.9, 4.1.4, 4.2.1
-
None
-
MOODLE_400_STABLE, MOODLE_401_STABLE, MOODLE_402_STABLE
Steps to reproduce:
- Create a assignment activity, with submission type file, and allowed file types 'document'. (Or, set up any other filepicker with limited file types).
- Log in as student, go to the assignment, and click 'edit submission'.
- Try to drag in a large video file. (Or, otherwise make the upload very slow, e.g. by using browser developer tools to throttle the connection speed.)
Actual result: the file is uploaded ot the server, and only after the upload is complete do you get the error that is is of the wrong type.
Expected result: you are immediately told the file is wrong, and we do not waste time uploading it.
For security reasons the file type should still be checked on the sever-side.
I guess that in a similar way, it would also be good to verify the file-size limit on the client side, before starting an expensive upload, if that is possible.
Note some related issues: