Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Springboot Plus
Commits
de7623d4
Commit
de7623d4
authored
May 03, 2018
by
scwang18
Browse files
增加附件中文名支持
增加一个直接到top层弹出窗口的函数。
parent
b6ad5cb4
Changes
2
Hide whitespace changes
Inline
Side-by-side
admin-core/src/main/java/com/ibeetl/admin/core/web/FileSystemContorller.java
View file @
de7623d4
...
...
@@ -3,6 +3,7 @@ package com.ibeetl.admin.core.web;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.io.OutputStream
;
import
java.net.URLEncoder
;
import
javax.servlet.http.HttpServletResponse
;
...
...
@@ -59,7 +60,7 @@ public class FileSystemContorller {
@GetMapping
(
MODEL
+
"/download/{fileId}/{batchFileUUID}/{name}"
)
public
ModelAndView
download
(
HttpServletResponse
response
,
@PathVariable
Long
fileId
,
@PathVariable
String
batchFileUUID
)
throws
IOException
{
FileItem
item
=
fileService
.
getFileItemById
(
fileId
,
batchFileUUID
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment; filename="
+
item
.
getName
());
response
.
setHeader
(
"Content-Disposition"
,
"attachment; filename="
+
URLEncoder
.
encode
(
item
.
getName
()
,
"UTF-8"
)
);
item
.
copy
(
response
.
getOutputStream
());
return
null
;
}
...
...
admin-core/src/main/resources/static/js/common.js
View file @
de7623d4
...
...
@@ -78,6 +78,16 @@ var Common = {
});
layer
.
full
(
index
);
},
topOpenDlg
:
function
(
url
,
title
){
var
index
=
top
.
layer
.
open
({
type
:
2
,
content
:
Common
.
ctxPath
+
url
,
title
:
title
,
area
:[
'
100%
'
,
'
100%
'
],
maxmin
:
false
});
layer
.
full
(
index
);
},
openConfirm
:
function
(
content
,
callback
,
callBackNo
){
var
index
=
layer
.
confirm
(
content
,
{
btn
:
[
'
确认
'
,
'
取消
'
]
//按钮
...
...
Write
Preview
Supports
Markdown
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