pod-upload v1.1.0
pod-upload
Quick start
npm i -g pod-upload
or
yarn global add pod-upload
pod-upload --key=XXX path/to/collection/
The key
value is obtained by creating a new account at https://nft.storage/ -> API keys
This command when run will do the following:
- It will scan the
images
to collect all.png
and.gif
files and upload them to the IPFS, what we get back is a CID (Content Identifier - a hash) of that image/gif - When it got the CID back it will modify the matching json metadata file and insert a new property
image
- After all metadata files is updated, it will pack the
metadata
directory into a CAR file and upload that to IPFS as well - which will return another CID back to us.
In the end we will have one single CID that is the root of all metada files and in each file there is an updated ipfs url to the image.
Notes
This command will permanately upload your data to the public internet which will be impossible to remove once it is cached on other peers's node so think carefully before you decide to run it
If by any chance that you encounter an error during run (e.g 429 too many requests on the nft.storage api) you can decrease the limit option (default is 5 which should be acceptable by nft.storage)
pod-upload --limit=2 path/to/collection/
Any uploaded file before the error happened will be skipped so it won't wastefully do the whole list twice
collection
should follow this structurecollection/ ├─ images/ │ ├─ 0.png │ ├─ 1.png │ ├─ 2.png │ ├─ ... ├─ metadata/ │ ├─ 0 │ ├─ 1 │ ├─ 2 │ ├─ ...