FleekUploader
FleekUploader is a simple, easy to use, and fast file uploader written in Node.js.
Installation
Install this package using npm globally:
$ npm install -g fleek-uploader
Usage
First, set these environment variables:
FLEEK_API_KEY=<your-api-key>
FLEEK_API_SECRET=<your-api-secret>
FLEEK_BASE_PATH=<base-path-to-upload>
Key and secret are required. Base path is optional. The default is /
.
Then pass the file or directory to upload as the first argument to the command.
# first, source the .env file
$ eval $(cat .env | sed 's/^/export /')
# zip and upload a single file
$ fleek-uploader /path/to/file.txt
# zip and upload a directory
$ fleek-uploader /path/to/directory
You can also do the above in a combination of setting environment variables and run the command. But this is not recommended because this displays the API key and secret in the command line.
$ FLEEK_API_KEY=<your-api-key> FLEEK_API_SECRET=<your-api-secret> fleek-uploader /path/to/file.txt