http request multipart/form-data

I need to send a file via API to an external API. This API receives via body of the multiform type. How do I send this from the typebot http request node? Folow Curl curl -X POST 'https://di.xxxxx.com/v1/files/upload' \ --header 'Authorization: Bearer {api_key}' \ --form 'file=@localfile;type=image/[png|jpeg|jpg|webp|gif] \ --form 'user=abc-123'
4 Replies
Baptiste
Baptiste13mo ago
We can't send file as multipart/form-data with the HTTP request for now It would work if the service accepts file URLs But that would be a great option to have
Baptiste
Baptiste13mo ago
GitHub
Option to send file as multipart/form-data · Issue #1419 · baptiste...
This would download the file located at the provided URL and send it to the service as multipart/form-data
Alfredo Neto
Alfredo NetoOP13mo ago
Thanks @Baptiste !
greenrhyno
greenrhyno9mo ago
Hi @Baptiste - I just came here to request this and see it is already in the queue. I keep running into situations where this would be VERY useful as some APIs just seem to only work with form data. Plus it does make them easier to set up and run at times. Any chance to prioritize this one? Oh, and you have it set as a solution to get the form elsewhere and bring it in? Any chance we could just have the form right in the block similar to postman?

Did you find this page helpful?