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 TypeValid MIME Types
IMAGEimage/jpeg,image/jpg,image/gif,image/png,image/bmp
VIDEOvideo/x-flv,video/mp4,video/quicktime,video/x-msvideo,video/x-ms-wmv,video/ogg,video/webm,video/3gpp
AUDIOaudio/aac,audio/mp4,audio/mpeg,audio/ogg,audio/wav,audio/webm,audio/mp3,audio/3gpp
PDFapplication/pdf
WORDapplication/vnd.ms-word,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document
POWERPOINTapplication/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation
EXCELapplication/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
TEXTtext/css,text/html,text/plain,text/tab
ZIPapplication/x-gzip,application/x-bzip2,application/x-tar,application/x-tar,application/zip,application/x-compressed-zip