gtcr icon indicating copy to clipboard operation
gtcr copied to clipboard

current IPFS Gateway does not support CIDv1.

Open gratestas opened this issue 3 years ago • 0 comments

data encoded with CIDv1 cannot be accessed over ipfs.kleros.io/ipfs/{cid} API https://ipfs.kleros.io/ipfs/bafkreicceibxr2urvyycth4tkgsggdzvt3ehmqb6pu5oi56plc2xpj2g3a

IPLD's encoded using

  • base58btc start with Qm... characters
  • base32 start with bafk... multibase prefix

because CIDv1 supports multiple codecs and multiple bases and CIDv0 does not, not all CIDv1 can be converted to CIDv0

as a hotfix: we implement a conditional case based on the prefix type to fetch from corresponding API

  • if Qm.. use ipfs.kleros.io/ipfs/{cid}
  • if bafk.. use {cid}.ipfs.dweb.link

gratestas avatar Nov 01 '22 12:11 gratestas