Commit 0904bf64 authored by 若依's avatar 若依 Committed by Gitee

!355 fix 跨域访问之后 下载无法获取 download-filename

Merge pull request !355 from 疯狂的狮子Li/master
parents a4558c32 45837877
...@@ -210,6 +210,8 @@ public class FileUtils ...@@ -210,6 +210,8 @@ public class FileUtils
.append("utf-8''") .append("utf-8''")
.append(percentEncodedFileName); .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("Content-disposition", contentDispositionValue.toString());
response.setHeader("download-filename", percentEncodedFileName); response.setHeader("download-filename", percentEncodedFileName);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment