osser
Provide multi-mode Alibaba Cloud OSS interactive command line upload tool

Read in other languages: English | 简体中文
Install
npm install -g osser
osser -v
Add configuration file
You need to put an oss initialization configuration file osser.js or osser.json in the project root directory.
AccessKey must be configured before it can be used normally.
Configuration Item Reference Link
module.exports = {
region: "",
accessKeyId: "",
accessKeySecret: "",
bucket: "",
fetchOptions: {
timeout: 100 * 1000,
},
};
glob pattern
Use glob pattern to match all files that need to be uploaded
osser --glob dist/**/*
osser -g dist/**/*
Multiple glob strings can be used to match files:
osser -g dist/**/* static/**/*.png
The matching path contains a relative path, and all matched files will be uploaded directly to the specified remote path, and folders will not be recursively created to store these files:
osser -g ../dist/**/*
osser -g ../dist/**/* -d xiaohong
If the same file is matched, it will be deduplicated:
osser -g **/** dist/**
You can use the --dir option to specify the bucket root directory for uploading oss:
osser -g dist/**/* --dir xiaoming
Use the --hash option to add a hash value to the uploaded file name:
osser -g dist/**/* --hash
osser -g dist/**/* -h 4
Use the --time option to add a timestamp to the uploaded file name:
osser -g dist/**/* --time
osser -g dist/**/* -t
osser -g dist/**/* -t -h