Open xylanreeves opened 2 years ago
yeah I was wondering the same thing. I'm currently crawling Zora's NFT contracts and many image URIs are the IANA ipfs scheme ipfs://
and I can't find a good way of "just" downloading them by looking at the docs. Am I missing something?
Edit: Seems even zora isn't capable of doing this: https://github.com/ourzora/nft-hooks/blob/6f0b9635b196051a5ff1242ebbf8e1335a742f6c/src/fetcher/UriUtils.ts#L5
Edit2: Found ipfs at IANA: https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml
I don't remember where, but I did read somewhere that ipfs:
(without the //
) and ipfs:/
should also be interpreted as ipfs urls. The same goes for ipns://
.
In addition, dweb://ipfs/
and dweb://ipns/
(or something like them) are also ipfs urls.
isIPFS.urlOrPath("ipfs://bafybeihbsysdkemc3kyylegtfopkrcfiih4exnasoql2q36fb4zawlrwhy/volcano.json")
returns false when it is a valid ipfs url/path!