lizai
v1.1.0
Published
lizai sdk upload service
Downloads
3
Readme
Uploader Service
A tool to upload folders with multipart upload.
Installation
npm install lizai
Usage
usage:
const { LizAI } = require('lizai'); var lizai = new LizAI(api_url, token) lizai.uploadFolder("foldername", {options})
Example:
const { LizAI } = require('lizai'); var lizai = new LizAI('https://example.com', "token_string") lizai.uploadFolder("foldername", {envConfigPath: "./config",includeFolder: true, threadUploads: 10, skipExtensions: [".mp3",".3gp"]})
positional arguments:
| Parameter| Description | |--|--| | folderPath| Path to the folder to upload |
options:
| Parameter| Description | |--|--| | envConfigPath | ENV Path file ENV | | includeFolder| Include folder path in key | | parentFolderName| Parent folder name to include in key | | threadUploads| Number of threads upload | | skipExtensions| Comma-separated list of file extensions to skip |
You can also include the folder name in the key:
uploadFolder("foldername", {includeFolder: true})
Or specify a parent folder name:
uploadFolder("foldername", {parentFolderName: "newfoldername"})
Upload all in current path use: folderPath = .
You can create .env file in folder config data config,
API_URL=https://example
TOKEN=token_string