Unverified Commit bf915c32 authored by Sandy's avatar Sandy Committed by GitHub

Update: use PathEscape replace QueryEscape

If filename contain space(" "), QueryEscape use "+" instead.
parent f1668881
...@@ -260,7 +260,7 @@ func (output *BeegoOutput) Download(file string, filename ...string) { ...@@ -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")
......
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