ali-oss-rx
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

oss web直传

安装

npm install --save ali-oss-rx   
<!-- or -->
yarn add --save ali-oss-rx

使用方法

1、 初始方法ID 加 监听回调

import client from "ali-oss-rx";
const ossOptions = {
  accessid:'xxxxx',
  accesskey:'xxxxx',
  dir:'static/test',// 上传目录
  host:'' //域名
}
this.client = new client({...ossOptions,success:(res)=>{},fail:(err)=>{
        console.log(err)
}});

// 
const theFile = e.target.files[0];
this.client.uploadFile(theFile);

2、 uploadFile 中使用监听回调

import client from "ali-oss-rx";
const ossOptions = {
  accessid:'xxxxx',
  accesskey:'xxxxx',
  dir:'static/test',// 上传目录
  host:'' //域名
}
this.client = new client({...ossOptions});

// <!-- 2.uploadFile -->
const theFile = e.target.files[0];
this.client.uploadFile(theFile,(res)=>{});

视频截图-- 通过远程视频进行视频截图

isCovered = true 会根据视频 oss 参数截取封面并上传oss

Readme

Keywords

none

Package Sidebar

Install

npm i ali-oss-rx

Weekly Downloads

1

Version

1.0.6

License

ISC

Unpacked Size

404 kB

Total Files

11

Last publish

Collaborators

  • klaus-1988