How do I upload a file from an external API and save it to bubble storage and attach it to a Thing

I have an external service that I am using to POST a base64 encoded file to bubble. I want the file to be saved in Bubble storage and I want to be able to attach the file to a Thing so I can make it private. I am currently able to upload a file to bubble using a backend workflow but the file does not get attached to a Thing and it is not private. Also, the url for the file also gets saved as a cdn url as opposed to my domains url which is different compared to when i save a file through my application.

Here is the backend workflow that i have setup

And here is the method I am using to POST the file to the backend workflow

Has anyone been able to successfully upload a file from an external service and make it private?

You can find information in Bubble docs

But you can search the forum too for how to send file to Bubble API… The way to send file in data or workflow API is the same.

1 Like

I’ve implemented a webhook from DIDIT, and it’s successfully saving the image into the file storage and linking it to the database.
image

However, I think you should initialize the backend workflow to receive data from the external API.

You have an url, not a base64 encoded file. This is not the same thing and Bubble expect a specific json object to accept it.

Thank you! I was using a payload that I had seen in another forum post. I should’ve checked the docs first…

1 Like