Fixed encoding of file name when downloading attachments (#4787)
Этот коммит содержится в:
коммит произвёл
enahum
родитель
1b6b69fa87
Коммит
51b794501e
@@ -529,7 +529,7 @@ func writeFileResponse(filename string, contentType string, bytes []byte, w http
|
||||
w.Header().Del("Content-Type") // Content-Type will be set automatically by the http writer
|
||||
}
|
||||
|
||||
w.Header().Set("Content-Disposition", "attachment;filename=\""+filename+"\"")
|
||||
w.Header().Set("Content-Disposition", "attachment;filename=\""+filename+"\"; filename*=UTF-8''"+url.QueryEscape(filename))
|
||||
|
||||
// prevent file links from being embedded in iframes
|
||||
w.Header().Set("X-Frame-Options", "DENY")
|
||||
|
||||
Ссылка в новой задаче
Block a user