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