From 3d48b26f2e4a9bd9aaec6e69f6dbd809098b352e Mon Sep 17 00:00:00 2001 From: wenc000 <450292408@qq.com> Date: Tue, 2 Jun 2020 09:55:41 +0800 Subject: [PATCH] =?UTF-8?q?GIF=E5=9B=BE=E7=89=87=E4=B8=8D=E5=8E=8B?= =?UTF-8?q?=E7=BC=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cm/common/plugin/service/file/impl/FileServiceImpl.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cloud-common-plugin/src/main/java/com/cm/common/plugin/service/file/impl/FileServiceImpl.java b/cloud-common-plugin/src/main/java/com/cm/common/plugin/service/file/impl/FileServiceImpl.java index c4824ff..032d3a7 100644 --- a/cloud-common-plugin/src/main/java/com/cm/common/plugin/service/file/impl/FileServiceImpl.java +++ b/cloud-common-plugin/src/main/java/com/cm/common/plugin/service/file/impl/FileServiceImpl.java @@ -635,12 +635,15 @@ public class FileServiceImpl extends AbstractService implements IFileService { } /** - * 是否是图片文件 + * 是否是图片文件, GIF图片不压缩 * * @param fileType * @return */ private boolean isImageFile(String fileType) { + if (StringUtils.equalsIgnoreCase("gif", fileType)) { + return false; + } String imageTypes = fileProperties.getImageTypes(); for (String imageType : imageTypes.split(",")) { if (StringUtils.equalsIgnoreCase(fileType, imageType)) {