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

Files API File Creation return value? #2610

Closed
matthewrobertbell opened this issue Apr 27, 2016 · 4 comments
Closed

Files API File Creation return value? #2610

matthewrobertbell opened this issue Apr 27, 2016 · 4 comments
Labels
need/community-input Needs input from the wider community

Comments

@matthewrobertbell
Copy link

In my opinion, it'd be very useful for the file creation API call to return the multihash of the file that's been created. Why is this not the case?

Cheers

@whyrusleeping
Copy link
Member

which api call are you talking about?

@matthewrobertbell
Copy link
Author

"ipfs files write --create" equivalent, accessed over the HTTP interface.

@whyrusleeping
Copy link
Member

A multihash isnt returned from that call because one isnt generated immediately on that write. You can call ipfs files stat on the path afterwards to get the hash, or use ipfs add <file> to get the hash, then ipfs files cp <hash> <files api path> to put it into place.

@Stebalien
Copy link
Member

Closing in favor of #6326 (which calls for a flag instead of doing this by default).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/community-input Needs input from the wider community
Projects
None yet
Development

No branches or pull requests

4 participants