Send data and file in rest API

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
1 answers

This forum post describes the process in two steps:

And see the documentation here for the one step:

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.