Skip to content
This repository has been archived by the owner. It is now read-only.

Can I get the hash for my data without adding it to IPFS? #227

Closed
rwaltr opened this issue Feb 14, 2017 · 8 comments
Closed

Can I get the hash for my data without adding it to IPFS? #227

rwaltr opened this issue Feb 14, 2017 · 8 comments
Labels

Comments

@rwaltr
Copy link

rwaltr commented Feb 14, 2017

more for curiosities sake. But it would be nice to see the hash before making the final write.

@RichardLitt
Copy link
Contributor

RichardLitt commented Feb 14, 2017

Do you mean something like ipfs ls <hash>, ipfs get <hash>, or ipfs refs <hash>? All of these work with existing hashes. Or you could check on the gateway.

If you're curious about getting a hash of your data without adding the content to IPFS, and then checking; I'm not sure if that is possible at the moment. Someone else will know more.

@rwaltr
Copy link
Author

rwaltr commented Feb 14, 2017

Your second paragraph is what I'm looking for.

@RichardLitt RichardLitt changed the title is there a way to see if an IPFS hash for your entries exist before contributing a file to IPFS? Can I get the hash for my data without adding it to IPFS? Feb 14, 2017
@RichardLitt
Copy link
Contributor

RichardLitt commented Feb 14, 2017

Renamed it to be a bit clearer. Let me know if that's not OK!

@RichardLitt
Copy link
Contributor

RichardLitt commented Feb 14, 2017

It looks like ipfs add <data> -n would work for you. From ipfs add -h:

  -n,     --only-hash           bool   - Only chunk and hash - do not write to disk. Default: false.

@rwaltr
Copy link
Author

rwaltr commented Feb 14, 2017

badass, Thanks a ton. I havent actually deployed IPFS yet, so I couldnt see the --help :/

@RichardLitt
Copy link
Contributor

RichardLitt commented Feb 14, 2017

Just tested. This works as you would expect - I got the hash, but was unable to get it locally or through the gateway.

@victorb
Copy link

victorb commented Feb 15, 2017

@flyingzumwalt
Copy link
Contributor

flyingzumwalt commented May 23, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants