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

Merge pull request !355 from 疯狂的狮子Li/master
master
若依 3 years ago committed by Gitee
commit 0904bf6446
  1. 2
      ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUtils.java

@ -210,6 +210,8 @@ public class FileUtils
.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);
}

Loading…
Cancel
Save