mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 13:00:54 +00:00
Update: use PathEscape replace QueryEscape
If filename contain space(" "), QueryEscape use "+" instead.
This commit is contained in:
parent
f16688817a
commit
bf915c3280
@ -260,7 +260,7 @@ func (output *BeegoOutput) Download(file string, filename ...string) {
|
|||||||
} else {
|
} else {
|
||||||
fName = filepath.Base(file)
|
fName = filepath.Base(file)
|
||||||
}
|
}
|
||||||
output.Header("Content-Disposition", "attachment; filename="+url.QueryEscape(fName))
|
output.Header("Content-Disposition", "attachment; filename="+url.PathEscape(fName))
|
||||||
output.Header("Content-Description", "File Transfer")
|
output.Header("Content-Description", "File Transfer")
|
||||||
output.Header("Content-Type", "application/octet-stream")
|
output.Header("Content-Type", "application/octet-stream")
|
||||||
output.Header("Content-Transfer-Encoding", "binary")
|
output.Header("Content-Transfer-Encoding", "binary")
|
||||||
|
Loading…
Reference in New Issue
Block a user