Send data and file in rest API

0
Hello,  earlier we had an requirement of sending data from mendix to other database via rest API and we handled it with post action rest API (export mapping with entire request) but now we need to send a file also along with the data. can we achieve this in one rest API call? if yes, how can we do that? I read in documentation that it will need form data and it can be done by binary data for entire request. does it mean we need to make two same API call with different request parameter? 1 is to send data and 1 is to send the file? Please suggest. Thanks
asked
1 answers
0

This forum post describes the process in two steps: https://forum.mendix.com/link/questions/104097

And see the documentation here for the one step: https://docs.mendix.com/refguide/call-rest-action#6-3-form-data

Use Request / Form data. There you can create the key and a value. For the filedocument you need to pass the Content of the filedocument in the value.

Regards,

Ronald

 

 

answered