|
|
@ -36,7 +36,7 @@ public class UploadFileUtil_Servlet3 { |
|
|
|
//2.生成文件名 [uuid.ext]
|
|
|
|
String original = getFileNameByPart(part); |
|
|
|
String ext = FileUtil.extName(original); |
|
|
|
if (StrUtil.isEmpty(ext) || !allowedExts.contains(ext)){ |
|
|
|
if (StrUtil.isEmpty(ext) || !allowedExts.contains(ext.toLowerCase())){ |
|
|
|
throw new NotSupportedFileTypeException("不支持的格式类型: " + ext); |
|
|
|
} |
|
|
|
String path = extraPath + File.separator + IdUtil.simpleUUID() + "." + ext; |
|
|
|