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:

2 Likes

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.)

@Jason I’d like to second this. Having the ability to set the component to only accept audio files would be important to me. I have image pickers for image uploading but my app only uses the file picker in one place to upload audio. I would want to restrict the user from uploading anything but audio. This suggestion is from almost a year ago. Any update to this? Is it already there and I just missed it?

While we’re waiting for a native solution, would you be able to use a Google Form for that purpose?

Please don’t make this a pro feature. We need this as a general feature, and as a user who doesn’t have Glide pro, I can tell you that this will drive more customers away from glide. Thanks.