WangYuLue / image-conversion

A simple and easy-to-use JS image convert tools, which can specify size to compress the image.
https://demo.wangyulue.com/image-conversion/
MIT License
909 stars 140 forks source link

在通过该插件对图片进行压缩到指定大小操作的过程中发现文件上传后台后文件后缀缀名丢失 #36

Closed hanbangbang closed 3 years ago

hanbangbang commented 3 years ago

`import * as imageConversion from 'image-conversion

compressImg(imgFile, type) { console.log(type) return new Promise((resolve) => { // 压缩到250KB,这里的250就是要压缩的大小,可自定义 imageConversion.compressAccurately(imgFile, this.fileMaxSize).then(res => { resolve(res) }) }) },`

choudewh commented 3 years ago

也碰到这个问题了 怎么解决的呢