ruoyi-common/src/main/java/com/ruoyi/common/utils/FileSaveUtil.java
@@ -1,6 +1,7 @@ package com.ruoyi.common.utils; import com.alibaba.excel.util.IoUtils; import com.ruoyi.common.exception.base.BaseException; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; @@ -69,7 +70,7 @@ suffix = originalFilename.substring(originalFilename.lastIndexOf(".")); // 如果后缀名不通过抛出异常 if (!isFileAllowed(suffix)){ throw new RuntimeException(suffix); throw new BaseException("不支持该文件类型上传"); } } // 名称拼接