# File API - bubbles incomplete

**URL:** <https://forum.bubble.io/t/file-api-bubbles-incomplete/174160>\
**Category:** APIs\
**Created:** [October 16, 2021, 7:30pm UTC](https://forum.bubble.io/t/file-api-bubbles-incomplete/174160 "2021-10-16T19:30:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rowntreerob](https://avatars.discourse-cdn.com/v4/letter/r/c6cbf5/32.png) [@rowntreerob](https://forum.bubble.io/u/rowntreerob)\
**Post date:** [October 16, 2021, 7:30pm UTC](https://forum.bubble.io/t/file-api-bubbles-incomplete/174160/1 "2021-10-16T19:30:11Z")

</div>

Review -

> [@API connector - Post.body as a binary file](http://forum.bubble.io/t/api-connector-post-body-as-a-binary-file/167367):
>
> JS Fetch.Post binary body is a standard way of pushing a binary file around in the context of APIs where the browser and using a “form” do not apply. getting the file as a blob/ArrayBuffer from the storage layer should be a requirement sending the above blob/ArrayBuffer as the body of a POST should be a requirement re - [Sending file via API connector - #9 by aaronsheldon](http://forum.bubble.io/t/sending-file-via-api-connector/150798/9) implement the equivalent of curl -X POST --data-binary @filePath

> [@POST to API using binary](http://forum.bubble.io/t/post-to-api-using-binary/30377):
>
> I’m working with an API that requires file data to be sent as binary. I have tried using the file converter plugin to convert to binary and then the API Connector plugin to sent but can’t figure out how to send it to the API as a POST properly as I continually get an error. I’ve attached below how I have it set up in Bubble. [18%20AM] [31%20AM]

**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](https://stackoverflow.com/a/6409028/560435) 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**

 ![mim_mult_bubbl_api](https://us1.discourse-cdn.com/bubble/original/3X/6/f/6f07a4036539e958f330904d8b242cf2eebc5c91.png)

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](http://forum.bubble.io/t/post-a-file-object-to-api/118078) 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](https://en.wikipedia.org/wiki/Extract,_transform,_load) bubble is missing out

**Get some engineers** on better support for web [file apis](https://developer.mozilla.org/en-US/docs/Web/API/File)

---

<div class="post-metadata">

**Author:** ![jeffdbl](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jeffdbl/32/121391_2.png) [@jeffdbl](https://forum.bubble.io/u/jeffdbl)\
**Post date:** [January 10, 2022, 11:58pm UTC](https://forum.bubble.io/t/file-api-bubbles-incomplete/174160/2 "2022-01-10T23:58:46Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![rowntreerob](https://avatars.discourse-cdn.com/v4/letter/r/c6cbf5/32.png) [@rowntreerob](https://forum.bubble.io/u/rowntreerob)\
**Post date:** [January 11, 2022, 12:53am UTC](https://forum.bubble.io/t/file-api-bubbles-incomplete/174160/3 "2022-01-11T00:53:32Z")

</div>

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](http://forum.bubble.io/t/aws-bucket-non-bubble-uploads-better-faster-cheap/184534) 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](https://github.com/rowntreerob/sampleexpress/blob/master/app.js#L93)

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.
