SE-1321 add multiple files upload allowed option


This PR adds an option to toggle between allowing multiple files uploaded and only allowing a single file. This is fully backwards compatible. Currently behaviour is to allow students to select an arbitrary number of files for the file upload response. Adding this option allows course authors to limit this to a single file upload.

For now, this is to be treated as a prototype. Hence no tests or updated translations yet.

*JIRA tickets*: (

*Dependencies*: None



*Sandbox URL*:

*Merge deadline*: None

*Testing instructions*:

1. create a new ora assessment on a course in studio
2. in the settings, make sure the file response is required or optional
3. below that in the settings, change "allow multiple files" to false (it must be true by default)
4. save and publish the ora
5. open the ora in the lms
6. click the button to upload files and confirm that only one file can be selected (ctl+click on multiple files will select multiple files if enabled)
7. select a single file and upload it. verify that it uploads successfully
8. repeat uploading a file to verify that uploading a new file, replacing the old file, still works
9. using the browser dev tools, inspect the upload file input and add the `multiple` attribute.
10. attempt to upload multiple files by selecting multiple files, adding a description for each one, and clicking upload files
11. verify that this is rejected server-side with an error message
12. refresh the page and verify that only the single, previously successfully uploaded file is visible
13. create a new ora assessment with a file response, but leaving "allow multiple files" as True
14. attempt to upload multiple files on this new assessment and verify that this still works successfully

*Author notes and concerns*:

  • Need to decide which is better from a UX point of view: rejecting with an error message, or simply removing any existing files in `upload_url` before returning the url. Either way, this case shouldn't happen unless someone is messing with the html elements and specifically tries to submit multiple files. Left as a rejection with error message.

  • Need to add a note to the UI next to the file upload input for students to know whether multiple files are allowed or not. possibly ok


  • [x] @pomegranited

  • [ ] edX reviewer[s] TBD

Won't Do


Jansen Kantor


Open Source Pull Request Bot

Contributor Name

Samuel Walladge




Epic Link


OSCM Assignee


Platform Map Area (Levels 1 & 2)


Platform Map Area (Levels 3 & 4)


Blended Hour Utilization Percentage


edX Theme


edX Squad


Github Lines Added


Github Lines Deleted