Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-2420

On Windows 8 , FileTransfer.upload ignores the fileKey and params options

VotersWatch issueWatchersLinkUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      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]);

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            purplecabbage Jesse MacFadyen
            youval.bronicki@gmail.com Youval Bronicki
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment