Upload PDF from Xano to external
![Frank Wieffering](https://us.v-cdn.net/6037124/user_avatars/3712245.jpg)
Hi,
I've been working on posting a file for a while now. What's the goal? We retrieve a PDF file from an external system. This file then needs to be posted to another system.
Retrieving the PDF is not a problem, and saving the file in Xano works fine as well. However, the challenge comes when we need to send it to another system using an API POST request. I've tried different methods, such as saving it in Xano first and then sending it, but I'm also open to a method that doesn't require saving the file (which is actually preferred).
In Postman, I can achieve the file posting successfully. However, when I import the cURL into Xano, it doesn't work as expected. It's probably related to how the file should be set in the request body, but unfortunately, I haven't been able to figure it out.
Here are some screenshots from Postman to illustrate the process. I hope someone can assist in understanding the correct approach for sending the file via Xano.
curl 'https://XXXXXX.resttest.afas.online/ProfitRestServices/fileconnector/KnSubject/687678.pdf' --header 'Authorization: AfasToken' --form 'untitleeeed=@"/Volumes/home/Download_shared/Untitled 2.pdf"'
Thank you in advance for your help!"
Best Answer
-
I think this is what you are looking for: https://docs.xano.com/working-with-data/functions/external-api-request#multipart-support
Answers
-
Thanks Ray, I have seen this part before, but my action was messed up. So now I started fresh and it works!
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback