Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-78671

File picker: file-types should be validated on the client-side before upload starts, for better UX and efficiency

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 4.0.9, 4.1.4, 4.2.1
    • Filepicker
    • None
    • MOODLE_400_STABLE, MOODLE_401_STABLE, MOODLE_402_STABLE

      Steps to reproduce:

      1. Create a assignment activity, with submission type file, and allowed file types 'document'. (Or, set up any other filepicker with limited file types).
      2. Log in as student, go to the assignment, and click 'edit submission'.
      3. 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:

            Unassigned Unassigned
            timhunt Tim Hunt
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.