How to resume download when app restarted


#1

Hi All, I am working on a download app using electron and angularjs.

with downloadItem, will-download and webContents.downloadURL, I can make download work successfully, however, if I pause current downloading and quit the app, I could not resume my downloading after app is reopened.

can anyone help?


#2

If you know at what point in the file write you paused, depending on where you’re downloading from and how you could possibly continue to write the rest to the file from where you left off. But that seems a bit weird, and could easily confuse users.

Maybe you could consider something like hyperdrive, which uses torrent-like chunks and diffing, which I think lends itself more easily to what you’re looking for.

It really depends what your use case is. I don’t think there’s a solution as simple as ‘continue from where I left off’ when you hard quit the app. Maybe you could keep the app open in the background and close once the download is complete?