diff --git a/de-xpack b/de-xpack index 3609b67779..114cb68167 160000 --- a/de-xpack +++ b/de-xpack @@ -1 +1 @@ -Subproject commit 3609b67779d4f92da4e1e037e2d3e98defeefe40 +Subproject commit 114cb68167079cb84eeaff060db9dd971166738f diff --git a/sdk/api/api-base/src/main/java/io/dataease/api/communicate/api/CommunicateApi.java b/sdk/api/api-base/src/main/java/io/dataease/api/communicate/api/CommunicateApi.java index a5036fe717..fb180b4926 100644 --- a/sdk/api/api-base/src/main/java/io/dataease/api/communicate/api/CommunicateApi.java +++ b/sdk/api/api-base/src/main/java/io/dataease/api/communicate/api/CommunicateApi.java @@ -3,6 +3,7 @@ package io.dataease.api.communicate.api; import io.dataease.api.communicate.dto.MessageDTO; import io.swagger.v3.oas.annotations.Hidden; import org.springframework.core.io.ByteArrayResource; +import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; @@ -17,4 +18,7 @@ public interface CommunicateApi { @GetMapping("/down/{fileId}/{fileName}/{suffix}") ResponseEntity down(@PathVariable("fileId") String fileId, @PathVariable("fileName") String fileName, @PathVariable("suffix") String suffix) throws Exception; + + @GetMapping(value = "/image/{imageId}", produces = {MediaType.IMAGE_JPEG_VALUE, MediaType.IMAGE_PNG_VALUE}) + ResponseEntity image(@PathVariable("imageId") String imageId); } diff --git a/sdk/common/src/main/java/io/dataease/utils/WhitelistUtils.java b/sdk/common/src/main/java/io/dataease/utils/WhitelistUtils.java index 63b98c8b13..d365c9e0fa 100644 --- a/sdk/common/src/main/java/io/dataease/utils/WhitelistUtils.java +++ b/sdk/common/src/main/java/io/dataease/utils/WhitelistUtils.java @@ -70,6 +70,7 @@ public class WhitelistUtils { || StringUtils.startsWithAny(requestURI, "/map/") || StringUtils.startsWithAny(requestURI, "/typeface/download") || StringUtils.startsWithAny(requestURI, "/typeface/defaultFont") + || StringUtils.startsWithAny(requestURI, "/communicate/image/") || StringUtils.startsWithAny(requestURI, "/communicate/down/"); } }