Post with form-data issue

0
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: java.security.PrivilegedActionException: javax.net.ssl.SSLException: 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/java.security.AccessController.doPrivileged(Native 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?
asked
2 answers
0

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,

Johan

answered
0

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:
java.security.PrivilegedActionException: javax.net.ssl.SSLException: Connection reset by peer: socket write error
at com.mendix.integration.util.PrivilegedUtil$$anonfun$withPrivileged$2.applyOrElse(PrivilegedUtil.scala:17)

 

 

answered