Skip to content
This repository was archived by the owner on Feb 5, 2025. It is now read-only.
This repository was archived by the owner on Feb 5, 2025. It is now read-only.

Feature Request: Improve ipfs utils #441

@Yuripetusko

Description

@Yuripetusko

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions