Filefly
All CDN/OSS upload providers in one command.
Installation
# npm npm i -g filefly # yarn yarn global add filefly
Overview
# upload file to Aliyun OSS filefly aliyun demo.jpg # upload file to qiniu filefly qiniu demo.jpg # open config file filefly config
Config
Use $ filefly config
to open the config.json
folder:
// config.json
Programmatic usage
# npm npm i filefly # yarn yarn add filefly
Aliyun
interactive upload
const aliyun = processenvALIYUN_ID processenvALIYUN_SECRET // You'll be asked for which Bucket to choose, what custom domain is, or custom upload bucket pathconst rawUrl customUrl = await aliyun
directly upload
const aliyun = processenvTEST_ALIYUN_ID processenvTEST_ALIYUN_SECRET // must set bucket name and region first bucketName: '' region: '' const rawUrl customUrl = await aliyun
Roadmap
- Aliyun
- qiniu
- AWS S3
License
MIT License