summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortanghao <admin@LAPTOP-QCSKVLI9>2021-03-26 14:28:20 +0800
committertanghao <admin@LAPTOP-QCSKVLI9>2021-03-26 14:28:20 +0800
commitf1ed7f150fc1221d40aa08aebc15a4b0c5bdf179 (patch)
tree08441623aff854418d5fe216889165d66850a603
parent5eb8e9544aa9436ebf8beefe5970c75dc8b92d12 (diff)
fix: 修复无法上传icon图片问题
-rw-r--r--nz-admin/src/main/java/com/nis/modules/project/service/impl/TopoIconServiceImpl.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/nz-admin/src/main/java/com/nis/modules/project/service/impl/TopoIconServiceImpl.java b/nz-admin/src/main/java/com/nis/modules/project/service/impl/TopoIconServiceImpl.java
index 1585cfb9..a083ea30 100644
--- a/nz-admin/src/main/java/com/nis/modules/project/service/impl/TopoIconServiceImpl.java
+++ b/nz-admin/src/main/java/com/nis/modules/project/service/impl/TopoIconServiceImpl.java
@@ -91,8 +91,8 @@ public class TopoIconServiceImpl extends ServiceImpl<TopoIconDao, TopoIcon> impl
// String fileType = filename.substring(filename.lastIndexOf(".") + 1);
// fileType = fileType.toLowerCase();
String fileType = StrUtil.sub(filename, StrUtil.lastIndexOf(filename, ".", filename.length(), false)+1,filename.length());
- if(!StrUtil.equals(fileType, "jpg",true) || !StrUtil.equals(fileType, "jpeg",true) ||
- !StrUtil.equals(fileType, "png",true) ||
+ if(!StrUtil.equals(fileType, "jpg",true) && !StrUtil.equals(fileType, "jpeg",true) &&
+ !StrUtil.equals(fileType, "png",true) &&
!StrUtil.equals(fileType, "gif",true)) {
throw new NZException(RCode.PROJECT_TOPOICON_FILETYPE_ERROR);
}