I want to use the API Connector to initiate form-data calls to upload an array of files using a 3rd party API endpoint. The 3rd party endpoint accepts uploading multiple files as an array of files.
How can I set up the ‘files’ parameter in the API Connecter to accept a list of files instead of one file only? (screenshot attached).
You would need to first check the API provider documentation on the format they accept and then format the value portion of the parameter to use that format…usually this would be JSON format, and the values to use in the JSON for the file would be the file URL.
Thank you both. The external API accepts a list of PDF files. It does not support file URLs.
When I am uploading one file only using Bubble’s multi-file uploader it works but it returns the error below when I am uploading multiple files. I suspect that this has something to do with how the API endpoint is set up in the API Connector.
I ran into the same problem this week. I’m no expert (yet ) but I think I found a decent workaround. Works for me as long as no one comes up with a better solution…
I’ve been trying to POST a list of files (images in my case) as well. Seems like this doesn’t work with a single parameter set up in the API Connector. Haven’t found a way to have a single parameter accept a list of files yet.
My solution is to set up multiple parameters. One for each file. Obviously you’ll have adjust your API-endpoint as well to make this work. You can still work with lists in Bubble, but you’ll have to POST each items as a different parameter.
Thanks for trying to help. Unfortunately, we can’t modify Eleven Lab’s endpoint to receive the files in multiple parameters as you suggested. You can only modify how you request things and you must request them as their docs say.
I have work out this issue using the Middleware developed in AWS Lambda.
I created one function which receive all files, in format { File , FileName , FilePurpose}. And from Lambda (developed using Python ) I sent all files in one parameter, and invoke third party API.