file-dbox
v1.0.3
Published
tools
Downloads
7
Readme
file-dbox
tools
1.引入
const { upload, download, zip, unzip } = require('file-dbox');
2.快速开始
upload
/download
需要特定服务端对接!
await zip('/a/b');
await unzip('/a/b.zip');
await rmrf('/a/b.zip');
3.upload
// let options = {
// filename: 文件名
// source: 文件路径
// }
upload(url, options).then(res => {
// todo
});
4.download
// let options = {
// filename: 文件名
// dest: 文件路径
// }
download(url, options).then(res => {
// todo
});
5.zip
zip(source[, destination]).then(res => {
// todo
});
6.unzip
unzip(source[, destination]).then(res => {
// todo
});
7.rmrf
rmrf(path).then(res => {
// todo
});