JSPM

@voyo/baidu-bos

0.0.2
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • 0
    • Score
      100M100P100Q29067F
    • License ISC

    sample upload for frontend package

    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=>{
      ...
    })