@extfans/squoosh-upload

1.0.1 • Public • Published

@extfans/squoosh-upload

将图片压缩后再上传到七牛

如何使用

yarn add @extfans/squoosh-upload

根目录新建一个qiniu.json文件:

{
  "AK": "xxxx",
  "SK": "xxxx",
  "BUCKET": "xxx",
  "ZONE": "xxx"
}

BUCKET: 需要将图片上传的位置

ZONE: 当前BUCKET的区域 Zone_z0(华东)Zone_z1(华北)Zone_z2(华南)Zone_na0(北美)

const squooshUpload = require('@extfans/squoosh-upload')

const imagePath = './test.jpeg'
const key = 'upload/test.jpg'

await squooshUpload({ imagePath, key })

Package Sidebar

Install

npm i @extfans/squoosh-upload

Weekly Downloads

4

Version

1.0.1

License

ISC

Unpacked Size

3.42 kB

Total Files

4

Last publish

Collaborators

  • simonwu
  • infinitynewtab