How to restrict the files that users can upload in the form?

"I need people to upload .js files through my form."- Google Docs Editors Community

Sometimes only one kind of file will do: .js files for a coding class, PDFs for an application, images for a gallery. Google Forms' upload question offers its own list of file types, .js isn't on it, and .js files can't be uploaded at all. With Formfacade, you type the extensions you accept, separated by commas, in the upload question's settings. The file picker then lets people choose only those types, within your size limit, and they upload with no Google sign-in. In the same settings you can make the upload required and set how many files each person adds.

Let's start. Import your Google Form and follow the steps below.

How to restrict the file types?

  • On the page that opens, paste your Google Form's link or click Browse to pick it, then click Next. Your form opens on the Edit tab.
  • If it asks "Do you want to preview this form?", click No. If your form has no file upload question, add one first.
The import page with a Google Form's link pasted in, with the link box and Next marked
  • In the Edit page, click on the file upload question, then click on the gear icon.
The Coding class assignment form on the EDIT tab with the file upload question selected and EDIT, the question and the gear at the bottom of its card marked
  • Select the answer tab. By default, file upload accepts the following file types: pdf, doc, docx, xls, xlsx, ppt, pptx, csv, txt, rtf, html, zip, mp3, wma, mpg, flv, avi, 3gp, m4v, mov, mp4, wmv, jpg, jpeg, png, gif
The Answer tab of the file upload question, with Answer and Allowed file extensions marked and the default list of file types greyed in the box
  • To restrict the file types that users can upload, add the extensions of the acceptable file types separated by commas as shown below and click on the Save button. For example, you can add the extensions pdf, doc, docx to accept only these three file types. For a coding class, add js as well.
The Answer tab with pdf, doc, docx, js in Allowed file extensions and that box and Save marked
When the user clicks on browse files, only the accepted file types can be selected. Users will be able to upload files with accepted extensions that do not exceed the max file size limit.
The upload box with browse files marked and the message You can only upload: .pdf, .doc, .docx, .js marked, above the note 1 file, 10 MB max

How to make the file upload required and set the number of files?

To make the file upload required, select the question tab in the Field settings screen, check Mark this as required field and click on the Save button.
The Question tab of the file upload question, with Mark this as required field ticked and that box and Save marked
To set the number of files that users can upload, select the answer tab. Use the slider scale to change the maximum number of files allowed and click on the Save button.
The Answer tab with the Maximum number of files slider at 2 files, and Answer, the slider and Save marked

Summary

Google Forms won't take some file types, such as .js, so a form that needs one of them gets the wrong files or none. With Formfacade, you add the extensions you accept to the upload question and people can only upload those files. Import your Google Form and complete the steps above. If you have any questions, write to support.

Accept only the file types you need in your Google Form.

Import your Google Form and type the extensions you accept, separated by commas, in the upload question's Answer tab. People can only pick those files.

Last updated: