You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently ipfs utils consist of a single ipfsToHTTP util that assumes that uri is ipfs://{CID} format. However we have been running an NFT marketplace for the last 3 years and seend all sorts of stuff being put in there. Http links with gateway and cid, http links without cid, if http link then http:// instead of https://, base64 strings, uris with directory/path reference, etc.
So it would be nice for ipfs util to handle wider range of cases
Describe alternatives you've considered.
I created a PR (will link in a sec), that uses is-ipfs library to check that CID is present in a string, and then re-construct a url based on that with provided gateway or default gateway
The text was updated successfully, but these errors were encountered:
Describe the solution you'd like
Currently ipfs utils consist of a single
ipfsToHTTP
util that assumes that uri isipfs://{CID}
format. However we have been running an NFT marketplace for the last 3 years and seend all sorts of stuff being put in there. Http links with gateway and cid, http links without cid, if http link then http:// instead of https://, base64 strings, uris with directory/path reference, etc.So it would be nice for ipfs util to handle wider range of cases
Describe alternatives you've considered.
I created a PR (will link in a sec), that uses
is-ipfs
library to check that CID is present in a string, and then re-construct a url based on that with provided gateway or default gatewayThe text was updated successfully, but these errors were encountered: