Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
finance-manage
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
finance-oa
finance-manage
Commits
8f23ff72
Commit
8f23ff72
authored
Feb 25, 2022
by
若依
Committed by
Gitee
Feb 25, 2022
Browse files
Options
Browse Files
Download
Plain Diff
!437 解决通用下载接口跨域问题
Merge pull request !437 from 兮陌/master
parents
e62e8e37
158e883e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
2 deletions
+0
-2
ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUtils.java
.../src/main/java/com/ruoyi/common/utils/file/FileUtils.java
+0
-2
No files found.
ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUtils.java
View file @
8f23ff72
...
@@ -196,7 +196,6 @@ public class FileUtils
...
@@ -196,7 +196,6 @@ public class FileUtils
*
*
* @param response 响应对象
* @param response 响应对象
* @param realFileName 真实文件名
* @param realFileName 真实文件名
* @return
*/
*/
public
static
void
setAttachmentResponseHeader
(
HttpServletResponse
response
,
String
realFileName
)
throws
UnsupportedEncodingException
public
static
void
setAttachmentResponseHeader
(
HttpServletResponse
response
,
String
realFileName
)
throws
UnsupportedEncodingException
{
{
...
@@ -210,7 +209,6 @@ public class FileUtils
...
@@ -210,7 +209,6 @@ 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
.
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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment