estuary-upload
v1.0.0
Published
## Usage
Downloads
1
Readme
estuary-upload
Usage
In code
import { Estuary } from 'estuary-upload';
const estuary = new Estuary('<api-key>');
const resp = await estuary.add('my-file.jpg');
console.log(`The file is uploaded to Estuary with CID ${resp.data.cid} preserved!`);
CLI tool to add all files in a directory
$ export ESTUARY_API_KEY=<api-key>
$ npm run add-dir <file-dirpath>
...
'bafkreia2254bseihmsqw7fzxsk54p7nqmitn2ibhnjiafxtql6by54idv4',
'bafkreigrov5qj25vp2vawsjlav5v3veihagovvddjodlydspmy2mtmks5q',
... 900 more items
]
Run Test
- Set API KEY
$ export ESTUARY_API_KEY=<api-key>
- Download test image
$ ./get-test-image.sh
- Run test
$ npm test