You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Edna Morales (JIRA)" <ji...@apache.org> on 2014/08/25 17:31:58 UTC

[jira] [Commented] (CB-6720) Cordova File-Transfer download fails on iOS

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

Edna Morales commented on CB-6720:
----------------------------------

I believe this was solved with issue CB-6525 linked above

> 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)