Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Add --cid-version option to ipfs files add #974

Merged
merged 1 commit into from
Sep 2, 2017

Conversation

alanshaw
Copy link
Member

@alanshaw alanshaw commented Sep 1, 2017

Allows --cid-version=1 to be passed to get a V1 CID for response Hashes.

Caveat is that if --cid-version=1 is passed then you must also pass --raw-leaves=false since raw leaves haven't yet been implemented and the default is to set --raw-leaves=true unless it is passed explicitly (behaviour from the go-ipfs implementation).

requires ipfs-inactive/js-ipfs-http-client#589

@daviddias
Copy link
Member

ipfs-inactive/js-ipfs-http-client#589 has been merged and released, #978 updates the deps, once merged, rebase master onto this branch and CI will pass.

@daviddias daviddias changed the base branch from master to update-deps September 2, 2017 20:03
@daviddias daviddias merged commit 91b2130 into ipfs:update-deps Sep 2, 2017
@alanshaw alanshaw deleted the files-add-cid-version branch September 4, 2017 08:18
@daviddias
Copy link
Member

Hi @alanshaw, started seeing this:

  1) cli files daemon on (through http-api) add with cid-version=1 and raw-leaves=false:
     Command failed: /home/travis/build/ipfs/js-ipfs/src/cli/bin.js add src/init-files/init-docs/readme --cid-version=1 --raw-leaves=false
/home/travis/build/ipfs/js-ipfs/src/cli/commands/files/add.js:79
        throw err
        ^
Error: multihash unknown function code: 0x36d9f6e02
    at parseError (/home/travis/build/ipfs/js-ipfs/node_modules/ipfs-api/src/utils/request-api.js:17:17)
    at ClientRequest.<anonymous> (/home/travis/build/ipfs/js-ipfs/node_modules/ipfs-api/src/utils/request-api.js:40:14)
    at ClientRequest.g (events.js:292:16)
    at emitOne (events.js:96:13)
    at ClientRequest.emit (events.js:188:7)
    at HTTPParser.parserOnIncomingClient (_http_client.js:474:21)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:99:23)
    at Socket.socketOnData (_http_client.js:363:20)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)

Do you know what is going on?

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

Successfully merging this pull request may close these issues.

2 participants