Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Background downloads with API #7672

Closed
NatoBoram opened this issue Sep 11, 2020 · 1 comment
Closed

Background downloads with API #7672

NatoBoram opened this issue Sep 11, 2020 · 1 comment
Labels
kind/enhancement A net-new feature or improvement to an existing feature

Comments

@NatoBoram
Copy link
Contributor

Sometimes, I want to download very large files, something like 10 GB. I don't necessarily want to leave a terminal hanging there be responsible for my download. I think the download feature can be improved quite a lot by using background downloads.

  1. All downloads should happen via the running daemon regardless of if called via terminal or API. If there's none, then the initiator should start a daemon in another process, use it, then kill it when it's over.
  2. Downloads should have progress reporting available via API.
  3. The terminal initiating the download should send an API command to the deamon to initiate the download then report progress via the API
  4. The daemon should be able to pause and resume downloads

This would make the daemon responsible for all downloads and have better integration with supporting tools such as IPFS Desktop.

Related : ipfs/ipfs-desktop#1499

@NatoBoram NatoBoram added the kind/enhancement A net-new feature or improvement to an existing feature label Sep 11, 2020
@lidel
Copy link
Member

lidel commented Sep 18, 2020

I don't necessarily want to leave a terminal hanging there be responsible for my download.

To be fair, if you want background download in terminal, you can ipfs refs -r <cid> & disown or run ipfs refs -r inside of tmux or screen. No need for anything new.

  1. All downloads should happen via the running daemon regardless of if called via terminal or API. If there's none, then the initiator should start a daemon in another process, use it, then kill it when it's over.

Check ipfs-or-gateway and ipget – those CLI tools may do 80% of what you want.

  1. Downloads should have progress reporting available via API.
  2. [progress reporting]

Fair request. Already tracked in #4028, so I'm closing this as a duplicate.

  1. The daemon should be able to pause and resume downloads

Technically you can do this already by interrupting ipfs get cat or refs.
Blocks that were downloaded up to that point are in local repo, and won't be downloaded again if you make the call again.

@lidel lidel closed this as completed Sep 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A net-new feature or improvement to an existing feature
Projects
None yet
Development

No branches or pull requests

2 participants