瀏覽代碼

取消压缩图片缩略图

xiewj 2 年之前
父節點
當前提交
c094dad760
共有 1 個文件被更改,包括 14 次插入11 次删除
  1. 14 11
      720yun_fd_manage/gis_service/src/main/java/com/gis/service/impl/FodderServiceImpl.java

+ 14 - 11
720yun_fd_manage/gis_service/src/main/java/com/gis/service/impl/FodderServiceImpl.java

@@ -189,17 +189,20 @@ public class FodderServiceImpl extends IBaseServiceImpl<FodderEntity, Long> impl
 
                 if (type.equals("image")) {
                     // 2022-10-27,图片大于1MB生成缩略图, 小于1MB使用原图作为缩略图
-                    if (size > 1024){
-                        savePath = savePath  + "/fodder/image/" + newName;
-                        log.info("savePath: {}", savePath);
-                        FileUtil.writeFromStream(file.getInputStream(), savePath);
-                        iconPath = convertAndUploadOss(
-                                savePath, configConstant.ossBasePath + "fodder", configConstant.ossDomain, 800, 800, "/thumb_" + newName);
-                        log.info("图片压缩完成");
-
-                    } else {
-                        iconPath = ossUrl;
-                    }
+//                    if (size > 1024){
+//                        savePath = savePath  + "/fodder/image/" + newName;
+//                        log.info("savePath: {}", savePath);
+//                        FileUtil.writeFromStream(file.getInputStream(), savePath);
+//                        iconPath = convertAndUploadOss(
+//                                savePath, configConstant.ossBasePath + "fodder", configConstant.ossDomain, 800, 800, "/thumb_" + newName);
+//                        log.info("图片压缩完成");
+//
+//                    } else {
+//                        iconPath = ossUrl;
+//                    }
+                    iconPath = ossUrl;
+
+
                 } else if ("video".equals(type)){
                     iconPath = createThumb(type, file);
                 }