This node app takes the NFT images and corresponding files for names and description as input, upload each images to NFT.Storge in a folder and then create the corresponding json files for each NFTs and upload it to a folder and return the base IPFS json file
- Node js
- Git
Clone the repo and install the dependencies.
git clone https://github.com/Tahlil/nft-storage-nft-upload.git
cd nft-storage-nft-uploadnpm i- Store all the images in the
imagesfolder. - Store the NFT names and descriptions in
info/name.txtandinfo/description.txtfiles respectively. - Create a
.envfile and copy the.env.examplefile to.envfile. - Create a NFT.storage API token, follow the instructions from this link to get the token
- Set the API token in the
.envfile for the environment variableNFT_STORAGE_TOKEN. - Run the following command to upload the NFT images and metadata json file. It will print the base folder CID for where all the metadata json files are stored.
node index.js
There are three validity checks for the NFT info:
- Check if the number of names and descriptions are same in the corresponding files
- Check if number of images in the
imagesfolder - Check if corresponding name is included in the description