You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Sergey Shakhnazarov (JIRA)" <ji...@apache.org> on 2015/10/30 17:50:28 UTC

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

     [ https://issues.apache.org/jira/browse/CB-6720?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sergey Shakhnazarov resolved CB-6720.
-------------------------------------
    Resolution: Cannot Reproduce

> 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
>              Labels: no-repro, triaged
>
> 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.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org