HTTP/1.1 Host: Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW cache-control: no-cache Content-Disposition: form-data; name="Filedata"; filename="   Hopefully someone at the forum can help me">  HTTP/1.1 Host: Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW cache-control: no-cache Content-Disposition: form-data; name="Filedata"; filename="   Hopefully someone at the forum can help me">  HTTP/1.1 Host: Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW cache-control: no-cache Content-Disposition: form-data; name="Filedata"; filename="   Hopefully someone at the forum can help me">
File upload Call REST service - Mendix Forum

File upload Call REST service

0

Hi!

How can I upload an file in a "Call REST Service" activity?

In Postman I see:

POST <api endpoint> HTTP/1.1
Host: <HOST>
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
cache-control: no-cache

Content-Disposition: form-data; name="Filedata"; filename="<Path to file>

 

Hopefully someone at the forum can help me

asked
1 answers
4

The Call REST service microflow action allows you to upload a file.

Note that you may send attribute values as URL parameters if the service supports this. 

See https://docs.mendix.com/refguide/call-rest-action#4-2-binary-for-the-entire-request

If you need to send a multipart request, you will need to use the REST services appstore module.

See https://github.com/mendix/RestServices#sending-and-receiving-files

answered