Syncplicity Support

Search our knowledgebase to get the help you need, today

Follow

After upgrade to Storage Connector 3.2 the upload from customer-developed client application fails with 500 Internal Server Error: IO

Problem

After an upgrade, the customer-developed Syncplicity clients are can no longer upload files to Syncplicity cloud or on-prem Storage Connectors. For example, this could occur when performing multipart post requests to the following Storage Connector endpoints:

  • /saveFile.php
  • /v2/mime/files
  • /v3/mime/files


org.apache.commons.fileupload.MultipartStream$MalformedStreamException: Stream ended unexpectedly

Cause

The multipart upload request performed by the customer-developed Syncplicity client does not conform with RFC 1341 - 7_2_MultipartThe Upload API of Storage Connector 3.2 enforces that RFC. Storage Connector 2.x was not strict about the multipart upload requests.

Solution

To resolve this issue, the customer-developed Syncplicity clients must modify their multipart upload requests to be compliant with RFC 1341. The most frequent issue is with the end of the POST request: last boundary should end with --, followed by two new lines (CRLF CRLF):

POST /saveFile.php HTTP/1.1
Host: ...
.....
Content-Type: multipart/form-data;boundary="boundary"
--boundary
Content-Disposition: form-data; name="field1"
value1
--boundary
Content-Disposition: form-data; name="field2"; filename="example.txt"
value2
--boundary-- <CRLF>
<CRLF>


Powered by Zendesk