cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JonathanM
Frequent Visitor

HTTP Post multipart/form-data

Hi,

 

I am trying to post SharePoint files to a 3rd party via their API.  Their API uses multipart/form-data.  After some trial and error, I can POSTcontent, but only text files come out correctly on the destination.  Other files (Excel, Word, jpg, etc.) post, but the data is not readable. What do I need to do to the file content to format it properly?

 

Thanks!

 

http post.png

 

49 REPLIES 49
Anonymous
Not applicable

Hi - Can someone provide an example to submit multiple files via one POST API request.

 

Files will be available in one drive/blob location. 

We need to read all files at once and submit them to POST API by adding them one by one in form-data.

Content type : multipart/form-data; 

 

From the postman submission of multiple files in one request is possible.

 

 

Could you please tell me how you translate this into Postman? Thanks!

matthew11111112
Regular Visitor

Hello,
I'm able to send my file, put I cannot open it. Do you know how I can do it please?

matthew11111112_0-1669293258074.png

 

matthew11111112_0-1669294934680.png

Invalid request for me, any idea? @SamPo 

matthew11111112
Regular Visitor

I have a error and I have to put X-NomFichier. How should I change that:

matthew11111112_0-1669317522731.png

 

Hi @WillPage,

I followed your web page. I'm with email attachment and I would like to send pdf file. Do you know what i'm doing wrong?

matthew12333333_0-1669379320882.png

 

What error?

The pdf is sent, but is still corrupted. (I cannot open it).

WillPage
Solution Sage
Solution Sage

What exactly are you converting to base64?. It might be that the input to that is already in the right format and you're doing an extra step that breaks it

Thank you, that was the point!!!!

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (4,749)