Sending file via API connector

I would interpret the documentation on the Bubble API Connector to mean they only support POST Body types of form-data or raw on top of the usual JSON. Your call requires a body type of binary, which is probably not supported by the Bubble API Connector. For files stored on Bubble’s S3 cloud the data is accessible only through Bubble’s “:encoded in base64” operator, which is definitely not what your endpoint is expecting.

If you want to send a byte or octet buffer in a POST you will have to write a custom Server Side Action that reads the base64 and buffers it back into bytes and then places the POST call inside of Bubble’s context.request function. Which itself exposes the deprecated Node.js request module.

3 Likes