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/11/05 14:51:27 UTC

[jira] [Resolved] (CB-8108) Cordova file transfer - download fails gradually for multiple files

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

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

> Cordova file transfer - download fails gradually for multiple files
> -------------------------------------------------------------------
>
>                 Key: CB-8108
>                 URL: https://issues.apache.org/jira/browse/CB-8108
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin File Transfer
>         Environment: iOS
>            Reporter: Nandini
>              Labels: no-repro, triaged
>
> We have nearly 250 files to download, when it starts it downloads faster for the first 10 files, later it slows down and at certain point it just stops, neither throws an error nor a success call back
> here is my code
>  function GetLayouts() {
>             if (LayoutIdArray.length == 0) {               
>                 return;
>             }
>             var remoteFile = LayoutIdArray.pop();
>             var fileURL = "cdvfile://localhost/persistent/" + remoteFile.ProjectId + "/" + remoteFile.FolderId + "/" + remoteFile.LayoutId + "/" + remoteFile.LayoutId + ".zip";
>             var fileTransfer = new FileTransfer();
>             var uri = encodeURI(zipUri + "/" + remoteFile.LayoutId + ".zip");
>             fileTransfer.download(
>                     uri,
>                     fileURL,
>                     function (entry) {
>                         console.log("download complete: " + entry.fullPath);                        
>                         GetLayouts();
>                     },
>                     function (error) {
>                         console.log("download error source " + error.source);
>                         console.log("download error target " + error.target);
>                         console.log("upload error code" + error.code);
>                     },
>                     false,
>                     {
>                     }
>             );



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