forked from github/dataease
refactor: 图片上传验证优化
This commit is contained in:
parent
36f13507a7
commit
35cc5ea587
@ -67,11 +67,7 @@ public class StaticResourceServer implements StaticResourceApi {
|
||||
return false;
|
||||
}
|
||||
// 判断是否为图片或SVG
|
||||
if (mimeType.toLowerCase().equals("image/svg+xml")) {
|
||||
return isValidSVG(file);
|
||||
} else {
|
||||
return mimeType.startsWith("image/");
|
||||
}
|
||||
return (mimeType != null && mimeType.startsWith("image/")) || isValidSVG(file);
|
||||
}
|
||||
|
||||
public void saveFilesToServe(String staticResource) {
|
||||
|
Loading…
Reference in New Issue
Block a user