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

Add resolver support for CIDv1 and Base32 #8

Closed
@lidel

Description

@lidel

(part of Migration to CIDv1 https://github.com/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

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugA bug in existing code (including security flaws)kind/enhancementA net-new feature or improvement to an existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions