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
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.