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-upload
npm i
- Store all the images in the
images
folder. - Store the NFT names and descriptions in
info/name.txt
andinfo/description.txt
files respectively. - Create a
.env
file and copy the.env.example
file to.env
file. - Create a NFT.storage API token, follow the instructions from this link to get the token
- Set the API token in the
.env
file 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
images
folder - Check if corresponding name is included in the description