How to use MFS in client app

We are developing NFT marketplace. We are using ERC1155 Tokens which will be created dynamically by users. They will upload token metadata which will be stored on IPFS. As metadata is uploaded by users we have challenge to keep baseURL of NFTs same.If we use ipfs then we cannot add metadata of next NFT to the same location of previous NFT. Hence we are trying to use MFS. However infura is not supporting MFS function. My question is broader. How can we store data on decentralized storage where NFTs will be created dynamically by users instead of having all NFTs and metadata upfront?

1 Like

MFS will not solve your problem, as its CID changes every time you make a change, and the CID is what you’ll use. IPFS is immutable, if you change something, the address changes, there’s no getting around it, no matter how much you wish for it.

Your mistake is to try and keep a base URL that is common to everything. Once you accept that each NFT has its own, the problems go away.

If you REALLY don’t want to get with the program, then look into using IPNS on top of IPFS, which adds the mutability you so desire (either native or dnslink based).

You can try orbit-db.
You can create a database for meta-data users can update without changing the hash of the parent object for it just needs to store the (immutable) db’s address