Quantcast
Channel: Mendix Forum Questions
Viewing all articles
Browse latest Browse all 83469

UploadImage To REST API error MineType

$
0
0
Hey all, I try to upload an image to a REST API. If I do it from postman it works but not from Mendix. I get the following response: HttpError 422 {"error_translatable":"Invalid mimetype","type":10,"title":"Unprocessable Entity","status":422,"detail":"error.api.upload.invalid-mimetype"} The difference I see is the content-type in the form-data but I can’t find this in Mendix. If I look at the request from Mendix it looks like this:   Request content for POST request to https://xxx.api.xxx.xxxx.tech/upload HTTP/1.1 Authorization: (omitted) Accept: application/json, text/plain, */* Accept-Encoding: gzip, deflate, br Connection: keep-alive Content-Type: multipart/form-data;      boundary="----=_Part_4_648412434.1616113866684" ------=_Part_4_648412434.1616113866684 Content-Type: application/octet-stream Content-Disposition: form-data; name="file"; filename="testimage19/09/2021 01:09:00.jpg" ����JFIF``��-

Viewing all articles
Browse latest Browse all 83469

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>