BAIDU OSS UPLOAD
Usage
const {SDK} =require('@voyo/baidu-bos');
const sdk=new SDK({
ak:'xxxx',
sk:'xxxx',
endpoint:'https://fsh.bcebos.com',
bucket:'bucketName'
});
uploadDir
sdk.putDir({
nativeDirPath:"/dist", // native path
targetDirPath:"/urlPath" // bos path
}).then((result)=>{
...
})
uploadDirWithGzip
upload dir file with auto compress file
sdk.putDirGzip({
nativeDirPath:"/dist",
targetDirPath:"/urlPath"
}).then(result=>{
...
})