Repository navigation
Description
Describe the bug
"Import from IPFS" implies it will fetch the content to your local repo. Currently It only fetches the root block, as, for reasons I do not yet understand that is how ipfs files cp works. It does not check if you have the full tree locally.
from the go-ipfs help, it looks like the assumption is that you will ipfs add something or otherwise ensure the blocks are available locally, and then ipfs files cp it to your mfs:
In order to add content to MFS from disk, you can use "ipfs add" to obtain the
IPFS Content Identifier and then "ipfs files cp" to copy it into MFS:
$ ipfs add --quieter --pin=false <your file>
# ...
# ... outputs the root CID at the end
$ ipfs cp /ipfs/<CID> /your/desired/mfs/path
– go-ipfs help from `ipfs files cp --help`
we can do a recursive refs fetch or similar to make "import from IPFS" do what it sounds like it would do.
To Reproduce
Steps to reproduce the behavior:
- Import from IPFS path a thing that only exists on 1 provider.
- shutdown the provider
- bad news, you dont have the full tree locally, and you can't fetch it from anywhere.
Expected behavior
Import from IPFS should add the blocks to my repo and ipfs files cp them into the MFS. If we want to be smart about it we could stat the root block and if it is larger than would fit in the users repo, then warn them and ask if they want to do a lazy import.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsPlanned / Backlog
Activity
jessicaschilling commentedon Nov 23, 2020
UX discussion from triage session:
Still some uncertainty about how to actually do this API-wise: @lidel @Gozala care to comment?
We'll also want to give some thought to whether/how we'd want to include an indicator in a future revision of the Files screen as to whether all blocks for a given item are local. See #1692 for related discussion on whether that's too expensive.
As of time of writing, bandwidth doesn't support our swarming on getting this fixed, but let's keep close to the top of our "quick fixes" priority list.
hsn10 commentedon Mar 31, 2021
Dont import all into local repo. My workflow depends on that, I work and organize very large files on my notebook. I do not want or need entire file content available localy.
SgtPooki commentedon Dec 2, 2022
We could benefit from providing an option to either load all blocks or not when we prompt users with the import from IPFS modal, defaulting to current behavior. Something like this:
SgtPooki commentedon Jul 3, 2023
Note: we should also have an indicator for users on the files screen that shows which files are fully downloaded locally or not, and give them an option to import them fully.
SgtPooki commentedon Jul 3, 2023
related to #1248
[-]Import from path should fetch entire tree[/-][+]feat: User can choose to import entire tree when importing content [/+]