Uploads an entire directory of files.
-h: The you'll node upload to
-t: The token to use when uploading.
-w: Your private key.
--index-file: Name of the file to use as an index for manifests.
--provider-url: RPC URL to use. This is only required when using Devnet.
irys upload-dir ./myImages \ -h https://node1.irys.xyz \ -t matic \ -w bf20......c9885307
irys upload-dir ./myImages \ -h https://devnet.irys.xyz \ -t matic \ -w bf20......c9885307 \ --provider-url https://rpc-mumbai.maticvigil.com
Devnet RPC URLs change often, use a recent one from https://chainlist.org/chain/80001 (opens in a new tab)
Files uploaded via
irys upload-dir can be retrieved in one of two ways.
- Creating an URL with the format
- Creating an URL using the transaction ID of each individual file uploaded with the format
After a successful folder upload, two files are written to your local project directory:
The example below highlights a folder called “llama_folder” with a total of 5 files in it. The transaction id for each file can be used to retrieve the uploaded data by forming an URL with the format