修复bug2

This commit is contained in:
2026-04-01 17:42:14 +08:00
parent 539caa4b5f
commit 5813425be9
9 changed files with 34 additions and 28 deletions

View File

@ -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());