diff --git a/core/core-backend/src/main/java/io/dataease/visualization/server/StaticResourceServer.java b/core/core-backend/src/main/java/io/dataease/visualization/server/StaticResourceServer.java index aaffc2f0b5..3dfce540bb 100644 --- a/core/core-backend/src/main/java/io/dataease/visualization/server/StaticResourceServer.java +++ b/core/core-backend/src/main/java/io/dataease/visualization/server/StaticResourceServer.java @@ -146,14 +146,6 @@ public class StaticResourceServer implements StaticResourceApi { return false; } } - - /** - * @param is - * @return - * @throws IOException - * @author jiangzeyin - * @date 2016-8-17 - */ public static FileType getFileType(InputStream is) throws IOException { byte[] src = new byte[28]; is.read(src, 0, 28); @@ -180,7 +172,7 @@ public class StaticResourceServer implements StaticResourceApi { private static Boolean isImageCheckType(MultipartFile file) { try { - return getImageType(file.getInputStream()) != null; + return getFileType(file.getInputStream()) != null; } catch (Exception e) { LogUtil.error(e.getMessage()); return false;