File API - bubbles incomplete

Review -

More Generally
A large capability gap exists in bubble’s features for passing files among modules/ apps in particular in response to events requiring standard file transfer in the absence of user’s choosing files and filling out HTML form dialogs.

For example a collaborating app needs to send my-bubbl-app files ( mp3’s say ) whenever they experience a threshold (likes go gold). No user involved , just a state change in a collaborating app where that app will respond with a POST to and Endpoint on bubble w an MP3 file in the POST.body.
To support this, 2 things from bubble are necessary ;

  • Host api routes handler for binary file POST action on https

  • Endpoint/Workflow → Data layer update to store file while also supporting
    – get file as buffered data
    – get usual attr values for size, mimetype, name, uri

Above from Mime-Multpart RFC … All of current bubble functions re files are closely tied to the rfc and to multipart form functionality, needlessly dragging in front-end form protocol.

As noted here bubble’s file handlers default to forms based practices. Please note the RFC on mime multipart and the importance /relevance to the presence of users, web pages and html forms to the spec. By relying solely on MMF to the exclusion of all the app-to-app file exchanges like ETL bubble is missing out

Get some engineers on better support for web file apis

2 Likes

Hi @rowntreerob, just came across this post as I was trying to figure out how to pass binary files via API to both Wordpress (image in a post), and Vimeo (setting a video thumbnail).

Are there any workarounds you can suggest, provided Bubble has not updated this?

bubble has revise the filemanager in a way that using bubble as an intermediate hop for files you can get a bubble based S3 URI that can be used in a proxy service to call the 2 api’s you mention.

If you leave aside WP for a minute taking a look here on AWS from/to proxy it should be clear that w minimal changes the proxy handles any Fetch.POST based REST api ( expects file in the request.body as a binary and readableStream format).

read here and respond if you think that adding an endpoint for WP uploads makes sense.

Parse-Server has REST upload very similar to WP and the code for that is already in the proxy
see here code

If you want a UX where user form is on a page and the user rather than your system is selecting the file having destination TO: wordpress then that would change things a bit but if you can figure out how to get the file to the bubble.S3 layer as a binary then this all works with minimal changes.