cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Watts (JIRA)" <>
Subject [jira] [Commented] (CB-12839) Cordova FileTansfer fails with error code 2 when uploading on Windows 10
Date Fri, 02 Jun 2017 21:59:04 GMT


Brian Watts commented on CB-12839:


I'm not sure what you mean by adding device capability -- We are talking about Windows 10
-- correct? The OS asks you for permission when you try to use the mic -- not sure exactly
what you are referring to. And I also was able to record audio without any permissions issues
on both Windows 8.1 and 10 -- with the resulting audio file being created.
Anyway -- that is not the problem I am facing.  When I upload *any* file on Windows 8.1, I
have no problem. When I use the exact same code and solution to try to upload on a Windows
10 OS, I get error code 2.

Yes -- I definitely do not get any information in the error callback.
>Does this error reproduce if you run application w/o VS2015?

I'm not sure what you mean by this -- as far as I know, I don't have an alternative way of
building Windows 10 applications... Cordova command line does not have the needed Windows
10 options. Maybe I'm missing something.

> Cordova FileTansfer fails with error code 2 when uploading on Windows 10
> ------------------------------------------------------------------------
>                 Key: CB-12839
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-plugin-file-transfer
>    Affects Versions: cordova@7.0.0
>         Environment: Windows 10 with Visual Studio 2015
>            Reporter: Brian Watts
>            Priority: Blocker
>              Labels: windows
>         Attachments:
> 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).
> {code}
> 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 = "";
>     ft.upload(src,server_name + "/alerts/upfile.php", upload_success, upload_fail, options);
> }
> {code}

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message