File Upload Challenges

Two questions for file upload.

  1. How can I limit the file upload type to pdf?
  2. When I try to “navigate” to the uploaded file, it doesn’t cleanly list the URL (it lists the base URL and ,%20// then the link. In the data store, it appears to have stored the correct path. How do I bring up the file? I would have thought this was straight forward.

I appreciate any help you can provide.

“%20” is a URL-Encoded space (so that’s on you). As for the other part, Bubble has no built-in facility for limiting uploads by MIME type. But I’m sure there are workarounds.

(The Issue is this: basically, a server MUST ingest a file to analyze it and then reject it. So Bubble just takes whatever it is offered. You could of course take that file stored in Bubble, pass it to some external analysis service, and then report back to Bubble whether the file should be rejected [delete it] or not [do nothing/keep it]. When server-side plugins get out of beta, I’d assume this will be one of the first things built… maybe.

You could file a RFE/bug report on this as your request is not uncommon, but I don’t think it’s often been formally requested. Others may have some quick and dirty solutions for this that they can offer.)

Thanks Keith! For the %20, it actually has a comma in front: When I try to “link to” the file (the file is stored properly in hte database, it tries to redirect to: mybaseurl.bubbleapps.io/version-test/,%20//s3.amazonaws.com/appforest_uf/etc

I can’t figure out how to get it to just go to the file. If I take out everything before the ,%20// and just add https:// it works, but for “wiring” it into the application, I am unable to get it to show the correct URL.

I will look into sending the file for analysis and removing if appropriate.

Still don’t know why I was getting a ,[space] before teh //aws. part of the URL, but if anyone runs into that, simply extract with regex like: //(.)*.pdf+

Hello, I have just published our first commercial plugin that would help with your original request. The plugin is named ‘File Informer’ and should be available soon.

Here is the plugin description;

Upload Informer automatically works with default Bubble file upload elements, HTML file input elements & other file upload plugins. The events fire & collect information about an upload elements file each time a user interacts with an upload element. Upload Informer reads the file client-side using the users browser, then provides custom states for it’s name, size, MIME, file type, Base64 & Base64 URL allowing you to run the reject or approve action’s before saving the file in your database. The reject action simply clears the file while the accept action allows you to override the file name before uploading the file directly to your database & providing the new Bubble URL. This plugin is best for single file uploads for better control, that said we have added some multi file element support for the first file. If demand for multi file analysis rises we can look at changing it.

Here is a demonstration application;


com_appforest_uf_f1535229274297x436912684701383100_premier_code_full%5B1%5D

Thanks,
PremierCode Team.

free plugin mime type with the relevant workflow

Hi,

I am trying to us this plugin, but i can’t figure out how to get the extension of any file…
Help needed please!