You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Mike Dawson (JIRA)" <ji...@apache.org> on 2015/02/13 01:15:11 UTC

[jira] [Created] (CB-8471) Impossible to resume FileTransfer download

Mike Dawson created CB-8471:
-------------------------------

             Summary: Impossible to resume FileTransfer download
                 Key: CB-8471
                 URL: https://issues.apache.org/jira/browse/CB-8471
             Project: Apache Cordova
          Issue Type: Improvement
          Components: Plugin File Transfer
            Reporter: Mike Dawson


Problem is when using the FileTransfer plugin to download a file, if the file is interrupted it will get automatically deleted.  It is therefor impossible to implement any kind of resume logic to resume the download and one can only restart from scratch.  If you are downloading on unreliable networks then your chances of ever succeeding will be very poor with larger files.

This is what happens on Android (FileTransfer.java line 948):

// Remove incomplete download.
if (!cached && result.getStatus() != PluginResult.Status.OK.ordinal() && file != null) {
    file.delete();
}

I suggest there should be an option keepIncompleteDownload that would allow the partial download to be kept.  Developers could then implement their own logic in Javascript to get the next part of the file using range headers and concatenate the parts together to reform the whole file.




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