Post with form-data issue

Hello, I am trying to send post call with form-data, am using MX 8.12.3. When i am sending a small file it works fine but when it’s a normal file i get an exception. Here is the eror: Error calling REST service     at VCS.File_POST (CallRest : 'Call REST (POST)')     at DFM.VCSDesignFile_Upload (SubMicroflow : 'File_POST')     at DFM.ACT_DFMReportHeader_Start (SubMicroflow : 'VCSDesignFile_Upload') Advanced stacktrace:     at com.mendix.integration.actions.microflow.RestCallAction.execute(RestCallAction.scala:60) Caused by: Connection reset by peer: socket write error     at com.mendix.integration.util.PrivilegedUtil$$anonfun$withPrivileged$2.applyOrElse(PrivilegedUtil.scala:17) Caused by: null     at java.base/ Method)     at com.mendix.integration.util.PrivilegedUtil$.$anonfun$withPrivileged$1(PrivilegedUtil.scala:13)     at scala.util.Try$.apply(Try.scala:213)….     I try to change the contentType to application/octet-stream, it didn’t help. What am I doing wrong?
2 answers

Hi Lital,

You probably want to send the content of the file in the part “file”. Try to update the value to $FileDocument/Contents.

Hopefully that works!

Kind regards,



Hi Lital, Johan

I also encountered the same error as Lital. I use MX 8.11.1.

I tried updating the value to $FileDocument/Contents, but I get the same error.

Here is the eror:

Advanced stacktrace:
at com.mendix.integration.actions.microflow.RestCallAction.execute(RestCallAction.scala:59)

Caused by: Connection reset by peer: socket write error
at com.mendix.integration.util.PrivilegedUtil$$anonfun$withPrivileged$2.applyOrElse(PrivilegedUtil.scala:17)