-
Notifications
You must be signed in to change notification settings - Fork 127
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
Script to update JSON file with proper IPFS Data for images #7
Comments
Can you upload the entire folder to IPFS, and your contract URI iterate over the IPFS folder? (I.E: ipfs://folderCID/metadata/1.json && ipfs://folderCID/images/1.png) If not, ill add this tomorrow. |
I tried as you suggested and the issue ends up that when ipfs://folderCID/metadata/1.json is called, it looks for the image at ./images/1.png (no actual reference to the containing folder). I went through some other projects and infact - the CID of the images and of the json are setup to be different (where the smart contract URI only references the JSON and the connection to the image is wholly contained in the JSON file. |
Does changing the baseURI in generator config to "" fix it? Either way, i'll post a patch 1.0.2 tomorrow. Thank you! |
I'm not sure, but as far as I can tell - it's a two step process. Appreciate it! (and I'm sure this belongs in a separate issue but you might consider adding "description" to the metadata as well. That seems to be a needed/popular attribute that is missing). |
Tomorrow became today, I hope that helps. Let me know what you think! |
Ok - that works perfectly! One thing that I noticed (not sure if this is new) is that now the .json files have leading zeros (as do the reference to images in the json. For example: |
Thanks, i'll fix padding the file names today. |
Feature Request: When deploying the NFT images and metadata to IPFS, it is necessary to first upload the images (and get a unique CID). Could a script be added to run after the index.py & once I get the CID to go through all files in the metadata folder and update the baseURI to represent the IPFS CID? (Or regenerate them based on all-object.json?) Obviously the data needs to maintain the connection to the image. is these feature possible if yes than can you share a video reference or doc for the same . |
Feature Request:
When deploying the NFT images and metadata to IPFS, it is necessary to first upload the images (and get a unique CID).
Then I need to update the JSON files to point at this CID. I can not create the CID in advance of running the generative script (index.py) as I do not have the CID until I upload the images.
Could a script be added to run after the index.py & once I get the CID to go through all files in the metadata folder and update the baseURI to represent the IPFS CID? (Or regenerate them based on all-object.json?) Obviously the data needs to maintain the connection to the image.
The text was updated successfully, but these errors were encountered: