cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Polivy (JIRA)" <>
Subject [jira] [Created] (CB-6313) Extra boundary in FileTransfer upload on Windows Phone
Date Wed, 19 Mar 2014 22:57:45 GMT
Dan Polivy created CB-6313:

             Summary: Extra boundary in FileTransfer upload on Windows Phone
                 Key: CB-6313
             Project: Apache Cordova
          Issue Type: Bug
          Components: Plugin File Transfer, WP8
    Affects Versions: 3.4.0
         Environment: Windows Phone 8; Cordova 3.4.0
            Reporter: Dan Polivy
            Assignee: Jesse MacFadyen

I am using the File Transfer plugin on Windows Phone 8, and am adding additional parameters
to the upload via FileTransferOptions.params. When doing this, I've found that an extra boundary
is emitted into the request, which unfortunately causes my node.js server (running express)
to fail in parsing the form submission.

The form submission ends up looking like this (notice the extra boundary included after the
parameters, and before the file itself):

Content-Disposition: form-data; name="param1"

Content-Disposition: form-data; name="param2"

Content-Disposition: form-data; name="file"; filename="///CapturedImagesCache/C__Data_Users_Public_Pictures_Camera


I've reviewed the code, and believe it is simply a one line fix to remove the line causing
the issue, but confirmation from one of the owners would be helpful.

For me, it is line 746 of FileTransfer.cs:
requestStream.Write(boundaryBytes, 0, boundaryBytes.Length);

I've confirmed that commenting out this line in my app will allow the upload to complete successfully.

This message was sent by Atlassian JIRA

View raw message