Skip to main content

Uploading a directory using the CLI

$ bundlr upload-dir ./uploadDir -h <bundlr-url> -c <currency> -w <wallet/private key>

Will begin a directory upload - these are done in 5 item chunks, and the manifest is saved to ./uploadDir/../uploadDir-manifest.json after every chunk. This allows you to resume an upload.

Upload output

$ bundlr upload-dir ./uploadDir -c arweave -h https://node1.bundlr.network

> Loaded address: 7smNXWVNbTinRPuKbrke0XR0N9N6FgTBVCh20niXEbU
> ? Authorize upload?
> Total amount of data: 72947780 bytes over 1000 files - cost: 17069780520 winston (0.01706978052 arweave)
> Y / N y
> Uploading items 0 to 50
> Uploading items 50 to 100
...
> Uploading items 950 to 1000
> Finished uploading 1000 items (0 failures)
> Uploaded to https://arweave.net/tVsrI5jVbvePUf6_cwNmGQ5i9vNnZCY7LuONOA1tm08

See js for how to upload directories programmatically.

Notes

The upload's manifest will not be uploaded until there are no erroring items - each item is retried 3 times before being marked as failed.
If you run out of funds midway through, the process will immediately stop and the items that did manage to get uploaded will be saved into the manifest for you to resume the upload from later after funding.
The directory upload can be re-run on folders with additions (or deletions¹ - but not edits) to create a new manifest including the changed items
Items that haven't changed from previous uploads will be re-used.
The last manifest ID (if applicable) is saved to ./uploadDir/../uploadDir-id.txt -
This saved ID is returned if there is no processing to do for a directory upload (i.e the directory has had no additions since the last upload)
A copy of the JSON manifest is saved as uploadDir-manifest.json - once an upload has completed you can delete this file and uploadDir-manifest.csv,
but deleting the latter will prevent the client from being able to 'update' your manifest with changes.
To globally override the content type files are uploaded with, use the flag --content-type - for example --content-type "application/json"
For unstable connections, you can forcefully use chunked item uploads via the --force-chunking flag.
¹ To remove now deleted items the flag --remove-deleted is required.

note

For more information on manifests, see here