How to Restrict File Uploads to Certain Type of Files

With File Upload Forms, you can easily build web forms that would let anyone upload files to your Google Drive. The files are uploaded via the Google File Picker and sent straight to a folder in your Google Drive.

File upload fields, by default, would allow users to upload files of any extension. However, if you wish to restrict users to only upload files of selected types, that can be easily configured through form settings.

Go to the Google Sheet, Addons, File Upload Forms, Form Settings and here look for the field Allowed File Types. The default value is ANY meaning all file types are accepted.

Valid file types are IMAGE, AUDIO, VIDEO, PDF, WORD, POWERPOINT, EXCEL, ZIP, TEXT or ANY for all types.

You can also specify multiple file types in the field. For instance, IMAGE,AUDIO,VIDEO would allow the user to only upload images and media files while WORD,PDF would restrict users to PDF and Microsoft Word documents.

Internally, the File Picker looks at the MIME Type of the file as shown in this table.

File Type Valid MIME Types
IMAGE image/jpeg,image/jpg,image/gif,image/png,image/bmp
VIDEO video/x-flv,video/mp4,video/quicktime,video/x-msvideo,video/x-ms-wmv,video/ogg,video/webm,video/3gpp
AUDIO audio/aac,audio/mp4,audio/mpeg,audio/ogg,audio/wav,audio/webm,audio/mp3,audio/3gpp
PDF application/pdf
WORD application/,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document
POWERPOINT application/,application/vnd.openxmlformats-officedocument.presentationml.presentation
EXCEL application/,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
TEXT text/css,text/html,text/plain,text/tab
ZIP application/x-gzip,application/x-bzip2,application/x-tar,application/x-tar,application/zip,application/x-compressed-zip