Batch upload your files to Arweave.
npm install
or
yarn install
Name your Arweave key as arweave-key.json
and put it in the root directory.
- Store the files to be uploaded in
./upload/
folder. - Prepare the CSV file with
filename
andipfsHash
fields: Thefilename
field should list the filenames match files in./upload/
folder. - Launch the program:
The resulting Arweave hash will be show on both console and
node index.js [list.csv]
./output-list.csv
.
Note that both filename
and ipfsHash
fields are optinal, but either one should be provided for each row of data:
- Program will check and update the
ipfsHash
if local file is found. - Program will get file from IPFS and store in
./upload/
folder if local file isn't found. - Program will skip uploading the file if file with the same
ipfsHash
tag can already be found in Arweave.
Note that the mime type of text-based formats like .txt
, .csv
, .svg
, etc is difficult to detect. Program will not add a mime tag for files loaded from IPFS when uploading.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.