Hi,
I need to resume a network.download() call which was cancelled by an applicationSuspend system event or a network.cancel() call.
I can obviously just remember the url and try to download the file again on applicationResume but then I have to start from scratch, i.e. download the complete file again. I would like to download just the missing part of the file I failed to download completely in the first attempt.
network.download() internally saves the file it downloads to a temporary file with a temporary name such as download-E3446515-F0F8-4190-A433-29475F0DF8D6. Sadly enough this file is erased on an applicationSuspend system event.
My plan was to provide a HTTP header such “Range: bytes=121432-” whenever I try with a second call to network.download() and then prepend the partial file (from the first attempt) to the file from the second attempt but alas that is not possible (see above).
Any hints on how to proceed?
Btw, the network module is such a nice piece of engineering. A solid async API combined with high performance. Thanks.
Cheers
/Joakim