You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Youval Bronicki (JIRA)" <ji...@apache.org> on 2013/02/12 23:45:12 UTC

[jira] [Created] (CB-2420) On Windows 8 , FileTransfer.upload ignores the fileKey and params options

Youval Bronicki created CB-2420:
-----------------------------------

             Summary: On Windows 8 , FileTransfer.upload ignores the fileKey and params options
                 Key: CB-2420
                 URL: https://issues.apache.org/jira/browse/CB-2420
             Project: Apache Cordova
          Issue Type: Bug
          Components: Windows 8
    Affects Versions: 2.4.0
            Reporter: Youval Bronicki
            Assignee: Jesse MacFadyen


The problem seems to be in FileTransferProxy, which simply ignores the options array.

Here's a partial correction (there are additional options in the array):

*Old Code:*
var blob = MSApp.createBlobFromRandomAccessStream(storageFile.contentType, stream);
var formData = new FormData();
formData.append("source\";filename=\"" + storageFile.name + "\"", blob);


*New Code:*
var fileKey = options[2];
var fileName = options[3];
var params = options[5];
 
var blob = MSApp.createBlobFromRandomAccessStream(storageFile.contentType, stream);
var formData = new FormData();
formData.append(fileKey, blob, fileName);
for (var key in params)
  formData.append(key, params[key]);
 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira