You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2014/06/14 03:47:01 UTC

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

    [ https://issues.apache.org/jira/browse/CB-2420?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14031392#comment-14031392 ] 

ASF GitHub Bot commented on CB-2420:
------------------------------------

Github user purplecabbage commented on the pull request:

    https://github.com/apache/cordova-plugin-file-transfer/pull/15#issuecomment-46075157
  
    @balauru + @cristi-badila 
    Can you try this version? https://github.com/purplecabbage/cordova-plugin-file-transfer/blob/CB-2420/www/windows8/FileTransferProxy.js
    
    Also, cristi, I cannot accept pull requests unless you sign a CLA.
    I saw no record that you had already signed.
    http://cordova.apache.org/#contribute
    



> 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: Plugin File Transfer, 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 was sent by Atlassian JIRA
(v6.2#6252)