uni-upload5
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

万能上传器

兼容 AWS、天翼云、七牛云、华为云上传

install

yarn

调试

`

yarn dev

`

发布

`

npm publish

`

使用

yarn add @wpsz/uni-upload

`

const observable = uniUpload(file.value, {

storage: 'qiniu',

appid: 'pcchat',

token: 'xxxxx',

key:'/dir/xxxx/filename'

config: {

​ bucket: 'wptalk',

​ fileDomain: 'https://wptalk.wpstatic.cn',

​ apiDomain: '',

​ apiSecret: 'Zcn368HknN5Z2-R7tj7PH7q26H8jLk8hYtnK6_cO',

​ yunMode: 1,

},

})

const observer = {

next(res) {

​ precent.value = res.total

},

async error(err) {

​ console.error(err)

},

complete(res) {

​ console.log(res)

},

}

// 开始上传

observable.subscribe(observer)

`

Readme

Keywords

none

Package Sidebar

Install

npm i uni-upload5

Weekly Downloads

0

Version

0.0.2

License

MIT

Unpacked Size

2.39 MB

Total Files

53

Last publish

Collaborators

  • qulf-npm