Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Cannot Reproduce
-
None
-
None
-
iOS 7.0.3 on iPad2 - Cordova 3.4.1-0.1.0
Description
File-Transfer download function exits with
"TypeError: 'null' is not an object (evaluating 'result.lengthComputable')"
Plugin version is 0.4.3, i tried 0.4.2 but the error is still the same. Please refer to this post:
http://stackoverflow.com/questions/23317010/cordova-file-transfer-download-result-null-error
Same exact code works fine on Android 4.0.2 .
EDIT:
Sample code used for testing:
function win(entry){ console.log("OK!"); } function fail(error){ console.log("ERROR!"); console.log(error.code); } var url = "http://upload.wikimedia.org/wikipedia/commons/5/5b/Ultraviolet_image_of_the_Cygnus_Loop_Nebula_crop.jpg"; var filename = "filename.jpg"; var uri = encodeURI(url); window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function(fileSystem) { fileSystem.root.getFile(filename, {create: true, exclusive: false}, function(fileEntry) { var localPath = fileEntry.toURL(); var ft = new FileTransfer(); ft.download(uri,localPath,win,fail,false); },function(error){console.log("errore 1: " + error.code);}); },function(error){console.log("errore 2: " + error.code);});