Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Improve ipfs utils #441

Open
Yuripetusko opened this issue Feb 25, 2024 · 0 comments
Open

Feature Request: Improve ipfs utils #441

Yuripetusko opened this issue Feb 25, 2024 · 0 comments

Comments

@Yuripetusko
Copy link
Contributor

Describe the solution you'd like

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

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

Successfully merging a pull request may close this issue.

1 participant