mirror of
https://gitee.com/johng/gf.git
synced 2024-11-30 19:27:46 +08:00
Merge pull request #1637 from wangbs95/feature/fix-chinese-encode
fix(fix bug , add nexttime feature): ServeFileDownload filename doubl…
This commit is contained in:
commit
158a4589d2
@ -92,7 +92,7 @@ func (r *Response) ServeFileDownload(path string, name ...string) {
|
||||
}
|
||||
r.Header().Set("Content-Type", "application/force-download")
|
||||
r.Header().Set("Accept-Ranges", "bytes")
|
||||
r.Header().Set("Content-Disposition", fmt.Sprintf(`attachment;filename="%s"`, url.QueryEscape(downloadName)))
|
||||
r.Header().Set("Content-Disposition", fmt.Sprintf(`attachment;filename=%s`, url.QueryEscape(downloadName)))
|
||||
r.Server.serveFile(r.Request, serveFile)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user