From 2c953f3a891a1a2682a956c5035cc850500f6ed2 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Fri, 30 Sep 2022 15:21:04 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=AE=9A=E6=97=B6=E6=8A=A5=E5=91=8A):=20?= =?UTF-8?q?=E7=AC=AC=E4=B8=89=E6=96=B9=E5=B9=B3=E5=8F=B0=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E6=8A=A5=E5=91=8A=E9=99=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/sys/SystemParameterController.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/backend/src/main/java/io/dataease/controller/sys/SystemParameterController.java b/backend/src/main/java/io/dataease/controller/sys/SystemParameterController.java index 63543ee308..dad2258764 100644 --- a/backend/src/main/java/io/dataease/controller/sys/SystemParameterController.java +++ b/backend/src/main/java/io/dataease/controller/sys/SystemParameterController.java @@ -24,6 +24,7 @@ import springfox.documentation.annotations.ApiIgnore; import javax.annotation.Resource; import java.io.IOException; +import java.net.URLDecoder; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -109,9 +110,10 @@ public class SystemParameterController { return new ResponseEntity<>(bytes, headers, HttpStatus.OK); } - @GetMapping("/filedown/{fileId}/{fileName}") - public ResponseEntity down(@PathVariable("fileId") String fileId, @PathVariable("fileName") String fileName) throws Exception { - + @GetMapping("/filedown/{fileId}/{fileName}/{suffix}") + public ResponseEntity down(@PathVariable("fileId") String fileId, @PathVariable("fileName") String fileName, @PathVariable("suffix") String suffix) throws Exception { + fileName = URLDecoder.decode(fileName, "UTF-8"); + fileName += ("." + suffix); return GlobalFileUtil.down(fileId, fileName); }