For File Upload (PRO) add ability to restrict file type

In HTML a standard input of type=file looks like this:

<input id='images' type='file' style='max-width: 100%;' accept='image/x-png,image/gif,image/jpeg' >

What I’m suggesting is that you should be able to type in the accept string to restrict the files that the user is able to select.

Here are some of the strings that are allowed:

1 Like

Great idea George. Can you give me an idea of what you would like to restrict the uploads to personally? We obviously wouldn’t want to force people to enter an accept string so figuring out what you need it for can help us design an interface.

Currently I’m interested in audio clips and images. It appears that the default that you are using now is any file, of course with the 10 meg limitation. Couldn’t you just have an optional short text input field where the user could put in what they want? For instance while testing uploading of audio recordings from my Android device the included app for taking voice memo’s saved the files with a .3gp extension and/or .amr. If I’m remembering correctly these extension would not play on the audio player component that Glide uses. So when I was using a web interface to select the audio files I restricted the types with this string accept=".wav, .mp3". (note: I did have to download a different voice recording app that allowed me to select the type of audio file format to save the recording to, in my case .mp3’s.)