Skip to content
This repository has been archived by the owner on Oct 23, 2022. It is now read-only.

unixfs examples do not actually use IPFS #487

Open
matthiasbeyer opened this issue Dec 9, 2021 · 1 comment
Open

unixfs examples do not actually use IPFS #487

matthiasbeyer opened this issue Dec 9, 2021 · 1 comment
Labels
question Further information is requested

Comments

@matthiasbeyer
Copy link

Hi,

so I was looking at the examples in the ipfs_unixfs subcrate and am wondering why the examples are not actually using ipfs... because I try to use them (the "add" example) as a blueprint for my "add" implementation for an app I am writing. I found that the blocks were not added to IPFS, so I assumed one just has to use the FileAdder and add the returned blocks to IPFS with Ipfs::put_block(), but it seems that this does not really work. The resulting IPFS entry is empty.

Maybe someone can help me there?
:-) And sorry for asking so many questions here!

@koivunej
Copy link
Collaborator

sorry for asking so many questions here!

No worries, apologies if I have missed any of those.

So ipfs-unixfs doesn't depend on ipfs but attempts to provide a standalone thing which could be useful beyond this repository. However, the implementation is not finished and is missing HAMT sharded directory creation, and efficient lookups.

You can find an the http endpoint /add implementation here which is currently the only example that I can remember writing for the functionality. Similarly all of the http endpoints have been implemented first, then thought of how to move this into a useful looking library feature. add has not yet been "refactored", as you can see from the http api endpoint, it does quite a many different things, so doing all that or a useful subset which would still be useful in the http endpoint is something I didn't get to find last time working on this.

Please note that many features are missing or rarely work on the project at all. We've tried to make all easily decidable cases like too large unixfs directories error early but for network operations this is not possible.

@koivunej koivunej added the question Further information is requested label Dec 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants