Using IPFS as baseURI

From what I understand, when adding a file to ipfs, one can access it with a link like:
https://ipfs.io/ipfs/QmdKektfKmAEw7f692D7G5yQbacQomeaRmgMDnpqG9bcJv

Is it possible to create individual ipfs tokenURIs without having to use _setTokenURI for each one of them?
For example, can I do something like: https://ipfs.io/ipfs/<my_project_hash>/<token_Id>
So that I can use https://ipfs.io/ipfs/<my_project_hash> as my baseURI?

EDIT: btw, I’m using pinata-sdk for pinning the files, if that helps.

Hi @gg_loxx welcome to Open Zeppelin!

I believe you can use a base URI and then just randomize it, but it depends on how your IPFS link is being created with Pinata.

Check out this post for explanations. You can create a directory.

1 Like

That’s exactly what I was looking for!! Thank you so much for your assistance!

1 Like