cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Dawson <>
Subject CB-8471: Impossible to resume FileTransfer
Date Fri, 13 Feb 2015 00:20:19 GMT

This has been discussed briefly before:

Problem is when using the FileTransfer plugin to download a file, if 
the file is interrupted it will get automatically deleted.  This is what 
happens on Android ( line 948):

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

This will make it impossible to resume from where the file left off, 
and on many networks/situations for a lot of people in countries / areas 
where the networks are not so good the probability of ever succeeding at 
downloading a sizeable (e.g. 30MB+) file will be very low and it would 
waste a lot of bandwidth.

It is true that resume is a complex business and perhaps out of the 
scope of such a plugin (what happens when file changes, how many 
retries, etc).  If we had just an option like keepIncompleteDownload 
which would default to false this (ie. keep the current behaviour) would 
allow developers to implement their own logic in Javascript to handle 
resume if they wish to - e.g. try the download again, sending a range 
header, to another file and at the end concatenate all the file pieces 

I have to make a working version of this behaviour for an app we 
currently develop just for Android; so I can write that behaviour there. 
I don't see any tests that describe the desired behaviour in this 

Would be interested to see if anyone else has any alternative 



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message