-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Allow adding directories via curl #3153
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
Comments
Note: I'm aware of |
You should be able to do this already. It's how the I tried looking in docs.ipfs.apiary.io/#reference/add but i'm getting lost / didnt find a clear example with a directory + many files. |
you may have to untar yourself, then pipe it into an |
|
eh sorry disregard my other comment. Another idea: the hash of an empty unixfs directory is currently QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn (it'll change with IPLD), you can use that to build your directory, iterating over all children, patching them into the directory. What @jbenet said about untar'ing as multipart into /api/v0/add might be better. |
I'll give it a try, didn't think about that. |
It would be pretty nice to have an 'inverse' of |
Perhaps |
@knupfer I really like that. |
Version/Platform/Processor information (from
ipfs version --all
):go-ipfs version: 0.4.3-dev-b5fbc01
Repo version: 4
System version: amd64/linux
Golang version: go1.6.2
Type (bug, feature, meta, test failure, question):
feature
Area (api, commands, daemon, fuse, etc):
api
Priority (from P0: functioning, to P4: operations on fire):
Description:
Provide a command, which takes a tarball, untars it and adds the untared content to ipfs.
This is useful to be able to add directories to ipfs via curl.
The text was updated successfully, but these errors were encountered: