GIF图片不压缩

This commit is contained in:
wenc000 2020-06-02 09:55:41 +08:00
parent 49b69fa464
commit 3d48b26f2e

View File

@ -635,12 +635,15 @@ public class FileServiceImpl extends AbstractService implements IFileService {
} }
/** /**
* 是否是图片文件 * 是否是图片文件, GIF图片不压缩
* *
* @param fileType * @param fileType
* @return * @return
*/ */
private boolean isImageFile(String fileType) { private boolean isImageFile(String fileType) {
if (StringUtils.equalsIgnoreCase("gif", fileType)) {
return false;
}
String imageTypes = fileProperties.getImageTypes(); String imageTypes = fileProperties.getImageTypes();
for (String imageType : imageTypes.split(",")) { for (String imageType : imageTypes.split(",")) {
if (StringUtils.equalsIgnoreCase(fileType, imageType)) { if (StringUtils.equalsIgnoreCase(fileType, imageType)) {