-
Notifications
You must be signed in to change notification settings - Fork 49
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
Upload directory / wrapper #41
Comments
Hi, IPFS-Store is a HTTP API on top of IPFS, uploading folders over HTTP isn't a common thing. Usually, the client sends each file one by one alongside metadata (like parent folder) and the backend stores files and metadata in a database or a file system. First of all, IPFS stores directories and files using a graph format called DAG (Directed acyclic graph), while each file stored on IPFS is represented as a tree (chunk of 256kb) . Directories actually use the same principle building a larger tree. Building this kind of behavior over an API like IPFS-Store wouldn't be easy as the client would have to upload the directory file by file (no parallelism possible) and IPFS-Store to build manually the DAG before storing it on IPFS and returning the final root hash to the client. For the ElasticSearch, files would have to be indexed afterward with the root hash and the path. It's an interesting feature, before starting implementing this, I would suggest to make a prototype to upload a directory from a web client to an IPFS node. |
Hi, gjeanmart. The prototype is ready. I did 10 days ago... It's necessary realize some adjust, but the upload multiple files works for one leaf. Maybe could be better, but it's working. I used the api Java-ipfs and the method upload Multiple files contains the upload of directories. My use case is uploading structures to ipfs cluster /daemon and after be possible distribute in some workstations. Tks |
Hi Douglas,
In any case, the files and folders need to be written on the filesystem before pushing to IPFS. I can try to explore a new controller which would basically store a directory. Just wondering how to index this in ElasticSearch (one document per root directory or one document per file). Thanks! |
Hi, everyone!
I'm studying about IPFS and find the IPFS-Store. It's great project and now I have a question.
How can I upload a structure of directories and subdirectories with IPFS-STORE?
Has someone an example or how I can do this?
Tks
The text was updated successfully, but these errors were encountered: