|
|
@@ -94,12 +94,12 @@ public class UploadUtil {
|
|
|
}
|
|
|
|
|
|
// 4. MIME类型校验
|
|
|
- String contentType = file.getContentType();
|
|
|
- if (!rule.getAllowedMimeTypes().isEmpty() &&
|
|
|
- !rule.getAllowedMimeTypes().contains(contentType)) {
|
|
|
- throw new MyException("文件类型不匹配,仅支持: " + contentType +
|
|
|
- String.join(", ", rule.getAllowedMimeTypes()));
|
|
|
- }
|
|
|
+// String contentType = file.getContentType();
|
|
|
+// if (!rule.getAllowedMimeTypes().isEmpty() &&
|
|
|
+// !rule.getAllowedMimeTypes().contains(contentType)) {
|
|
|
+// throw new MyException("文件类型不匹配,仅支持: " + contentType +
|
|
|
+// String.join(", ", rule.getAllowedMimeTypes()));
|
|
|
+// }
|
|
|
}
|
|
|
|
|
|
// 安全的获取扩展名方法
|