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

Add to docs to set cid-version if using regular ipfs client #6

Open
treeder opened this issue Apr 22, 2019 · 5 comments
Open

Add to docs to set cid-version if using regular ipfs client #6

treeder opened this issue Apr 22, 2019 · 5 comments

Comments

@treeder
Copy link
Contributor

treeder commented Apr 22, 2019

User can add files using --cid-version 1 flag on add, eg:

ipfs add --cid-version 1 -r .
added zb2rhWpvkHi9XTH8JBbFRhxtA8weq28NDitoE28Yn2WuWVHxL hellocontract/Goodbye.abi
added zb2rhdWtBKCBcSC1Dk1G9pvNduPgyLG9q5dKt3iUVWSyxtJBb hellocontract/Goodbye.bin
added zb2rhWpvkHi9XTH8JBbFRhxtA8weq28NDitoE28Yn2WuWVHxL hellocontract/Hello.abi
added zb2rhiFh3TiS8c68LXYRzeZZHVBGNyDF8B8cNMfz8tPnq4fGp hellocontract/Hello.bin
added zb2rhbMEihhirTwQMgtQgbBDwZNYq63kZYaQThGhoqm3VCXvk hellocontract/goodbye.sol
added zb2rhi1n8MxSWBDZKSz9MB3PCRufDHNjDr2jamL2bczGD31ih hellocontract/hello.sol
added zdj7Wby448YUUqwVrqpGvVqCoXzKm81kwCXz59mh5yWgomtUC hellocontract
@jmank88
Copy link
Contributor

jmank88 commented Apr 22, 2019

--raw-leaves is actually the necessary option, and v1 is implied.

@treeder
Copy link
Contributor Author

treeder commented Apr 22, 2019

That doesn't seem to be right, uses old one for the root.

 ipfs add --raw-leaves -r .
added zb2rhWpvkHi9XTH8JBbFRhxtA8weq28NDitoE28Yn2WuWVHxL hellocontract/Goodbye.abi
added zb2rhdWtBKCBcSC1Dk1G9pvNduPgyLG9q5dKt3iUVWSyxtJBb hellocontract/Goodbye.bin
added zb2rhWpvkHi9XTH8JBbFRhxtA8weq28NDitoE28Yn2WuWVHxL hellocontract/Hello.abi
added zb2rhiFh3TiS8c68LXYRzeZZHVBGNyDF8B8cNMfz8tPnq4fGp hellocontract/Hello.bin
added zb2rhbMEihhirTwQMgtQgbBDwZNYq63kZYaQThGhoqm3VCXvk hellocontract/goodbye.sol
added zb2rhi1n8MxSWBDZKSz9MB3PCRufDHNjDr2jamL2bczGD31ih hellocontract/hello.sol
added QmUsoghUd1NLd9XtYBYDLRhRhYva3PnQ7kkF2HaqsNCzJG hellocontract

@jmank88
Copy link
Contributor

jmank88 commented Apr 22, 2019

That conflicts with docs I've read in multiple places, but I don't fully understand how raw leaves works. It may treat directories differently, or this could be a bug.

@treeder
Copy link
Contributor Author

treeder commented Apr 22, 2019

cid-version has correct behavior, so might as well just use that.

@jmank88
Copy link
Contributor

jmank88 commented Apr 22, 2019

From the code it looks like v1 forces raw-leaves anyways, so that should be fine.

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

No branches or pull requests

2 participants