Package Exports
- @voyo/baidu-bos
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@voyo/baidu-bos) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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=>{
...
})