Skip to content

Instantly share code, notes, and snippets.

@enorms
Created August 2, 2021 05:56
Show Gist options
  • Save enorms/343567b01ef69ec1f6d47f806fcae035 to your computer and use it in GitHub Desktop.
Save enorms/343567b01ef69ec1f6d47f806fcae035 to your computer and use it in GitHub Desktop.
IPFS CID v2 > v1 for browser
ipfs cid format -v 1 -b base32 [CID]
@enorms
Copy link
Author

enorms commented Aug 2, 2021

Since a browser is not case sensitive, the old version of the CID must be used. For example, QmPLXKUMMn8FnVVuBrJNefxiZr35UMvHLXex5NSvqGo4q7 is indistinguishable from qmplxkummn8fnvvubrjnefxizr35umvhlxex5nsvqgo4q7. % ipfs cid format -v 1 -b base32 QmPLXKUMMn8FnVVuBrJNefxiZr35UMvHLXex5NSvqGo4q7 gives bafybeiao2nkkx5cvf6wp6lm2z6zgda4prmgpkk27k3h44ywddr4oxf2kgi which can then be used in the browser like https://bafybeiao2nkkx5cvf6wp6lm2z6zgda4prmgpkk27k3h44ywddr4oxf2kgi.ipfs.dweb.link/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment