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

Cordova FileTansfer fails with error code 2 when uploading on Windows 10

    XMLWordPrintableJSON

    Details

      Description

      I've been stuck on this for days. I am pretty sure that it is a bug as I have tried every possible combination of options in the upload call. Furthermore, the same code works for iOS, Android, Windows Phone 8.1, Windows Phone 10 and Windows Desktop 8.1. Windows Desktop 10 always fails with error code 2 (syntax error). I have also made tests with a minimal application that just tests the upload function (plus a small portion that creates the file to upload).

      function upload_file() {
          var options = new FileUploadOptions();
          options.fileKey = "upfile";
          options.mimeType = 'm4a';
          var src = "ms-appdata:///temp/myalert.m4a";
          var ft = new FileTransfer(); 
          options.fileName = "myalert.m4a";
          options.chunkedMode = false;
          var server_name = "http://hp3.xpub.io";
          ft.upload(src,server_name + "/alerts/upfile.php", upload_success, upload_fail, options);
      }
      

        Attachments

        1. test2.zip
          10.20 MB
          Brian Watts
        2. Screen Shot 2017-06-05 at 10.59.34 AM.png
          75 kB
          Brian Watts
        3. Screen Shot 2017-06-15 at 2.52.11 PM.png
          60 kB
          Brian Watts
        4. Screen Shot 2017-06-15 at 2.51.59 PM.png
          123 kB
          Brian Watts

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              bhwatts Brian Watts
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: