Forum Documentation Showcase Pricing Learn more

File upload limited to file type


Is there any way the file upload can be limited to file type.
I only want pdf docs to be uploaded. Is this possible?


Not right now, but if it’s critical reach out by email and we’ll see what we can do.


any update on that?
I am interested also to limit the uploading of files over 1MB or so…

Many thanks


The limitation is 50 mb/ file. This topic is about file TYPE :slight_smile:


Good to know thanks!
However, I would need also to limit that size… to downsize the storage required to save all user-files… any tip?


considering a recent video player called video.js has shown up it would be appreciated if the ability to limit file types in the uploader would be very helpful.


where are you seeing the video.js player?


it’s a plugin, you can install it from the plugin’s tab. I’d be happy if bubble’s file uploaded allowed the limiting of file types that can be uploaded so apps using plugins that rely on specific file types can be sure that the only file types they want uploaded can be uploaded.


Any solutions found for this? Just like a couple of people on this thread I need to limit uploads to PDF and also limit upload sizes.


It does seem odd that MIME Type is not exposed for File objects, since clearly Bubble knows them … as can be seen in the uploaded files section of the Data admin interface.

This actually would be super helpful. Now that there’s more robust File API functionality, perhaps this will soon be exposed.

(If MIME Type were exposed, the way this would work in one’s workflow iis: the uploader would upload whatever file the user selects, but then if that new File’s MIME Type does not match your permitted types, it would immediately Delete an Uploaded File on that new object and you would present an error to the user.)


no need to wait…do it now. you get the file name back from the uploader…either use regex to grab the file extension or @jarrad has a plugin to check the MIME and then run a workflow to either accept or delete


That works for file type. What about limiting the file size?


Any update on this? Can files be limited to file type?


You can get the file extension from the file name with regex and display a message that the upload is not allowed.

The same way it should be possible to get the filesize and reject the file …

It is also possible to change the file upload window and limit it to specific file types. For this you probably have to create a new uploader plugin.