|
@@ -189,17 +189,20 @@ public class FodderServiceImpl extends IBaseServiceImpl<FodderEntity, Long> impl
|
|
|
|
|
|
if (type.equals("image")) {
|
|
if (type.equals("image")) {
|
|
// 2022-10-27,图片大于1MB生成缩略图, 小于1MB使用原图作为缩略图
|
|
// 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)){
|
|
} else if ("video".equals(type)){
|
|
iconPath = createThumb(type, file);
|
|
iconPath = createThumb(type, file);
|
|
}
|
|
}
|