From db3f03bda9a732a87a6b5db049bbe58c169f9fb0 Mon Sep 17 00:00:00 2001 From: gaoxiongzaq Date: Fri, 28 Apr 2023 09:46:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9C=A8=E5=8F=8D=E4=BB=A3?= =?UTF-8?q?=E6=83=85=E5=86=B5=E4=B8=8B=20=E5=8E=8B=E7=BC=A9=E5=8C=85?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E8=B7=AF=E5=BE=84=E7=9A=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/main/java/cn/keking/utils/DownloadUtils.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/server/src/main/java/cn/keking/utils/DownloadUtils.java b/server/src/main/java/cn/keking/utils/DownloadUtils.java index 0437d31f..cb62d59e 100644 --- a/server/src/main/java/cn/keking/utils/DownloadUtils.java +++ b/server/src/main/java/cn/keking/utils/DownloadUtils.java @@ -38,13 +38,9 @@ public class DownloadUtils { public static ReturnResponse downLoad(FileAttribute fileAttribute, String fileName) { // 忽略ssl证书 String urlStr = null; - String urlStrr = null; - URL urll; try { SslUtils.ignoreSsl(); urlStr = fileAttribute.getUrl().replaceAll("\\+", "%20"); - urll = new URL(urlStr); - urlStrr = URLDecoder.decode(urll.getPath(), "UTF-8"); } catch (Exception e) { logger.error("忽略SSL证书异常:", e); } @@ -58,7 +54,7 @@ public class DownloadUtils { } assert urlStr != null; if (urlStr.contains("?fileKey=")) { - response.setContent(fileDir + urlStrr); + response.setContent(fileDir + fileName); response.setMsg(fileName); return response; }