How to recieve Json data in combination with a binary file using a pubished REST service - Mendix Forum

How to recieve Json data in combination with a binary file using a pubished REST service

0

How can I receive a binary file in combination with Json (body) data using a published REST Service.

How to deal with this in Postman and how to set this up in Mendix.

I managed to receive the file but was unable to map the JSon data

Postman example:

asked
2 answers
1

 

And sending it as formdata? Does that work?form-data

answered
1

If you send the binary file as a base64 encoded string, then you can post ot together with the other datafields.

{
"Name":"test.doc",
"BinaryFile":"ZmhhcGh2cGF3aGZwYWhuZ...etc...zI0MDc4NDY1NiB5dGhvaGF3"
}

 

answered