提交文件校验
This commit is contained in:
@@ -60,7 +60,7 @@ public class SupvFileController extends BaseController {
|
|||||||
) {
|
) {
|
||||||
String methodDescribe = getMethodDescribe("planUpload");
|
String methodDescribe = getMethodDescribe("planUpload");
|
||||||
String originalFilename = file.getOriginalFilename();
|
String originalFilename = file.getOriginalFilename();
|
||||||
if (FileUtil.judgeFileIsWord(originalFilename) && FileUtil.judgeFileIsPdf(originalFilename) && FileUtil.judgeFileIsExcel(originalFilename)) {
|
if (FileUtil.judgeFileIsWord(originalFilename) || FileUtil.judgeFileIsPdf(originalFilename) || FileUtil.judgeFileIsExcel(originalFilename)) {
|
||||||
if (!StrUtil.isAllNotBlank(planId, uploaderId, uploaderName, attachmentType, uploadTime) || type == null) {
|
if (!StrUtil.isAllNotBlank(planId, uploaderId, uploaderName, attachmentType, uploadTime) || type == null) {
|
||||||
throw new BusinessException("必填字段不能为空");
|
throw new BusinessException("必填字段不能为空");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user