From 35cc5ea587bc0f92d433e0fdd6d6e49a47037378 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Thu, 19 Sep 2024 09:54:22 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=9B=BE=E7=89=87=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E9=AA=8C=E8=AF=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dataease/visualization/server/StaticResourceServer.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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 fa583af1cc..6fff4f87e2 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 @@ -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) {