Skip to content
This repository has been archived by the owner on Sep 28, 2021. It is now read-only.

Add resolver support for CIDv1 and Base32 #8

Closed
lidel opened this issue Aug 8, 2018 · 2 comments · Fixed by #9
Closed

Add resolver support for CIDv1 and Base32 #8

lidel opened this issue Aug 8, 2018 · 2 comments · Fixed by #9
Labels
kind/bug A bug in existing code (including security flaws) kind/enhancement A net-new feature or improvement to an existing feature

Comments

@lidel
Copy link
Member

lidel commented Aug 8, 2018

(part of Migration to CIDv1 https:/ipfs/ipfs/issues/337)

Problem

Right now only multihash resolver exists and it means directory listing assumes everything is CIDv0 in Base58btc:

currentCid = new CID(mh.fromB58String(memo))

multihashOfNextFile = mh.toB58String(link.multihash)

This means response for https://js.ipfs.io/ipfs/bafybeibrpdf53xmnhkspaiyo46hqw6avk3vo3tvggwc2szzybd2a5cn24y/img/ is an error:

error screenshot_21

(when js-ipfs is running in service worker)

Solution

resolver.multihash should be removed/deprecated and replaced by base-agnostic resolver.cid

@lidel lidel changed the title Add resolver for CIDs, add support Base32 Add resolver support for CIDv1 and Base32 Aug 8, 2018
@lidel
Copy link
Member Author

lidel commented Aug 8, 2018

@vasco-santos I want to re-use ipfs-http-response in ipfs-companion, but need CIDv1 support.
Is it okay for me to create PR with proposed solution, or do you want to solve it some other way?

@vasco-santos
Copy link
Member

Hello @lidel , thanks for reporting this! 👍

Create a PR with the proposed solution please 🙂

@vasco-santos vasco-santos added the kind/enhancement A net-new feature or improvement to an existing feature label Aug 8, 2018
@daviddias daviddias added status/ready Ready to be worked kind/bug A bug in existing code (including security flaws) labels Aug 25, 2018
@ghost ghost removed the status/ready Ready to be worked label Sep 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug A bug in existing code (including security flaws) kind/enhancement A net-new feature or improvement to an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants