From 65c93bb63b1be49561331ed1f79ab889104c7cf7 Mon Sep 17 00:00:00 2001 From: liyawei Date: Wed, 22 Jun 2022 11:24:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E6=8A=A5=E5=BA=93-=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E5=88=B0=E5=A4=84=E6=A8=A1=E6=9D=BF-=E9=99=84=E4=BB=B6?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/oss/service/impl/OSSFileServiceImpl.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/oss/service/impl/OSSFileServiceImpl.java b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/oss/service/impl/OSSFileServiceImpl.java index 4d12498a0..6786e76ff 100644 --- a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/oss/service/impl/OSSFileServiceImpl.java +++ b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/oss/service/impl/OSSFileServiceImpl.java @@ -111,6 +111,16 @@ public class OSSFileServiceImpl extends ServiceImpl impl throw new JeroBootException("Only upload pdf,word,excel type of file Please select the file again!"); } } + } else if ("2".equals(state)) { + String fileTypeStrTwo = ".doc,.DOC,.docx,.DOCX,.xls, .XLS,.xlsx,.XLSX"; + //固定文件 + if (!fileTypeStrTwo.contains(fileType)) { + if (cut.equals(CutEnum.CN.getValue())) { + throw new JeroBootException("只能够上传word,excel类型的文件。请重新选择文件!"); + } else { + throw new JeroBootException("Only upload word,excel type of file Please select the file again!"); + } + } } else { if (CommonUtils.limitFileSuffix(orgName, fileSuffixLimits)) { if (cut.equals(CutEnum.CN.getValue())) {