[ 
https://issues.apache.org/jira/browse/CB-6720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14008740#comment-14008740
 ] 

Iain Campion commented on CB-6720:
----------------------------------

I have this same issue with a project, was working fine, then upgraded to 0.4.3 
as per stake overflow and bang ... error as described above.

looks like result.lengthComputable can't be evaluated as result is null .. and 
not an object. . where ever that gets set.

> Cordova File-Transfer download fails on iOS
> -------------------------------------------
>
>                 Key: CB-6720
>                 URL: https://issues.apache.org/jira/browse/CB-6720
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin File Transfer
>         Environment: iOS 7.0.3 on iPad2 - Cordova 3.4.1-0.1.0
>            Reporter: Zcs Mobile
>
> 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:
> {code:JavaScript}
> 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);});
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to