Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

post-oss

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

post-oss

oss upload

  • 0.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-60%
Maintainers
1
Weekly downloads
 
Created
Source

阿里云ossCDN SDK

阿里云OSS上传静态文件SDK

安装

npm i oss-post-cdn

参数

配置项必填默认值备注
cwdtrue''上传文件地址
keyUrlfalse---秘钥校验地址
remoteAuthtrue''秘钥校验码
uploadHtmlfalsefalse默认不上传html文件
uploadErrorfalsenull上传失败回调
uploadSuccessfalsenull上传成功回调
uploadCompletefalsenull上传完成回调

示例

import OSSCDN from 'oss-post-cdn';
import path from 'path';

new OSSCDN({
    cwd: path.join(process.cwd(), 'static/book'), 
    keyUrl: 'http://localhost:6001/api/getRemoteKey',
    remoteAuth: 'BWifxsyy',
    uploadError: function (err, response, body) {
        console.dir("uploadError_err:",err);
        console.dir("uploadError_res:",body);
    },
    uploadSuccess: function (err, response, body) {
        console.dir("uploadSuccess_err:",err);
        console.dir("uploadSuccess_res:",body);
    }
})

FAQs

Package last updated on 24 Dec 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc