mirror of
https://github.com/dataease/dataease.git
synced 2026-05-15 13:32:18 +08:00
refactor(仪表板、数据大屏): 修复特定图片不能上传问题
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user