From 89d776acb540cf05acb979640b83628c3ba6a1c1 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子Li <15040126243@163.com> Date: 星期六, 27 十一月 2021 16:36:11 +0800 Subject: [PATCH] fix 修复 OSS 工厂 未实例化服务更新加载问题 --- ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUtils.java | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUtils.java index 6e09a4a..ff56a2a 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUtils.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUtils.java @@ -32,6 +32,8 @@ .append("utf-8''") .append(percentEncodedFileName); + response.addHeader("Access-Control-Allow-Origin", "*"); + response.addHeader("Access-Control-Expose-Headers", "Content-Disposition,download-filename"); response.setHeader("Content-disposition", contentDispositionValue.toString()); response.setHeader("download-filename", percentEncodedFileName); } -- Gitblit v1.9.3