修复bug2
This commit is contained in:
@ -213,11 +213,11 @@ public class SysOssServiceImpl implements ISysOssService, OssService {
|
||||
try {
|
||||
byte[] imageData = file.getBytes();
|
||||
// 检查是否需要压缩
|
||||
if (ImageCompressUtil.needCompress(imageData)) {
|
||||
// 压缩到100KB以内
|
||||
imageData = ImageCompressUtil.compressImage(imageData);
|
||||
// 使用压缩后的数据
|
||||
}
|
||||
// if (ImageCompressUtil.needCompress(imageData)) {
|
||||
// // 压缩到100KB以内
|
||||
// imageData = ImageCompressUtil.compressImage(imageData);
|
||||
// // 使用压缩后的数据
|
||||
// }
|
||||
uploadResult = storage.uploadSuffix(imageData, suffix, file.getContentType());
|
||||
} catch (IOException e) {
|
||||
throw new ServiceException(e.getMessage());
|
||||
|
||||
Reference in New Issue
Block a user