Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Resume download #93

Open
Hunsu opened this issue Jul 7, 2015 · 2 comments
Open

Resume download #93

Hunsu opened this issue Jul 7, 2015 · 2 comments

Comments

@Hunsu
Copy link

Hunsu commented Jul 7, 2015

Please implement the possibility to resume a download.

@mmp
Copy link
Contributor

mmp commented Jul 7, 2015

Unfortunately it isn't obvious how to do this given the Drive APIs. (But maybe it can be possible with some creative thinking...)

The issue is that, given a partially downloaded file, we need to be able to figure out if the bytes in the file so far match the starting bytes of the file on Drive. Drive will happily give us the MD5 checksum of the whole file, which doesn't help, or will give us the last modification time of the file, which might help: we'd need to store the Drive-side modification time of the file locally when we start a download and then compare that to the Drive-side modification time before trying to resume a partial download.

In turn, it's not obvious where best to store that information locally: perhaps a temporary directory. (But then there's the issue that it's important to be sure to clean up those files eventually as well..)

@Hunsu
Copy link
Author

Hunsu commented Jul 9, 2015

The solution maybe is to add a --resume option for download command, so when the file already exist try to resume the download.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants