File transfer error after updating cordova version 3.5


#1

After updating cordova version 3.5 getting error code 3 while uploading file using cordova File transfer .

this error coming after 60 seconds.

My code

var options = new FileUploadOptions();
options.headers = { Connection: “close” };
options.chunkedMode = false;
options.fileKey = “recFile”;
var imagefilename = imageURI;
options.fileName = imagefilename;
options.mimeType = “image/jpeg”;
var ft = new FileTransfer();
ft.upload(imageURI, “http://0000000000/api/FileUpload”, win, fail, options);

plugin versions.


#2

You got error 3 -> it is the AbortError.

Maybe your API for uploading is not online or takes to long for the response and after 60sec you run into a timeout?
If you update cordova you should update the plugins to the newest version (cordova.file and file-transfer).

Greets, bengtler


#3

thanks to reply bengtler… i have already updated all the plugin after updating cordova 3.5

first remove all the plugin using
 cordova plugin rm  <pluging name>
then add each of them using
cordova plugin add  <pluging name>

i am still getting that error code 3 . My web api path is correct and its hosted on same machine.
i found same issue lots of people getting and saying its bug in file pluging into cordova 3.5…

can i use older file plugin or it will have some dependency with plugins…
Can i find and use any latest cordova jar file which will have all pluging inside in my android project?


#4

file-transfer plugin depends only on the file-plugin.
So you have to first look for these plugins.

After that, some other plugins like camera-plugin have a dependency to the file-plugin.
But for testing purpose you can downgrade only file-transfer plugin.

Greetz.