File send in REST API post action

0
Hello All, i need to send a file and comments in 1 API call with two entries. i am not sure how can i achieve this in mendix. Please help, if i am doing wrong here? It is giving me an error with 415: Unsupported Media Type mendix
asked
2 answers
1

Hi , 

You can change the content type to multipart-formdata and make this POST Rest API call easily. This will allow you to send both your file document and the comments.  Find the below reference. When you use binary you can send only the file document as input. This will help you to get the API work. 

 

As this is for 7.23.8 please use the following link  https://forum.mendix.com/link/questions/104349

 

answered
0

The option given above is the right way…
another way to do the same is to convert your file into string by encoding it and then pass it in the request.

answered