set filename in Content-Disposition header

This commit is contained in:
Chris Lu
2020-07-25 20:06:40 -07:00
parent 54eebf538f
commit 023a1efdf2
3 changed files with 6 additions and 6 deletions

View File

@@ -218,7 +218,7 @@ func handleStaticResources2(r *mux.Router) {
r.PathPrefix("/seaweedfsstatic/").Handler(http.StripPrefix("/seaweedfsstatic", http.FileServer(statikFS)))
}
func adjustHeadersAfterHEAD(w http.ResponseWriter, r *http.Request, filename string) {
func adjustHeaders(w http.ResponseWriter, r *http.Request, filename string) {
if filename != "" {
contentDisposition := "inline"
if r.FormValue("dl") != "" {