Nanobots Producing Megastructures

    sunland-upload-sdk

    1.3.1 • Public • Published

    尚德上传文件夹到文件服务系统(批量上传)

    安装

     npm install --save sunland-upload-sdk

    配置项

    在项目根目录新建如下xxx.json

    {
     "SDUrl": "https://sfs-api.shangdejigou.cn/api/auth/",
     "remotePath": "https://sfs-public.shangdejigou.cn/sunlands_back_freestudy",
     "accessKey": "xxx",
     "secretKey": "xxx",
     "prefix" : "/fe/ananas",
     "localPath" : "ananas"
    }
    • SDUrl 获取文件系统接口地址
    • remotePath 文件系统配置的cdn地址
    • accessKey accessKey
    • secretKey secretKey
    • prefix 拼接到cdn网址后(一般为项目名称)
    • localPath 本地需要上传的路径

    执行上传

    -package.json

      {
        "script": {
          "upload": "upload xxx.json"
        }
      }
    
    • tips upload 为暴露的cli命令

    Install

    npm i sunland-upload-sdk

    DownloadsWeekly Downloads

    48

    Version

    1.3.1

    License

    ISC

    Unpacked Size

    6.86 kB

    Total Files

    5

    Last publish

    Collaborators

    • duleigiser