|
|
@@ -125,11 +125,6 @@ public class FileUploadUtils
|
|
|
InvalidExtensionException{
|
|
|
|
|
|
byte[] decode = Base64.decode(file.getContent());
|
|
|
- InputStream inputStream = new ByteArrayInputStream(decode);
|
|
|
- String type = FileTypeUtil.getType(inputStream);
|
|
|
- if(!isAllowedExtension(type,MimeTypeUtils.DEFAULT_ALLOWED_EXTENSION.toArray(new String[0]))){
|
|
|
- throw new RuntimeException("上传文件类型不允许");
|
|
|
- }
|
|
|
String extension = file.getExtension();
|
|
|
if(StringUtils.isEmpty(extension) || "null".equals(extension))
|
|
|
{
|