diff --git a/weed/server/common.go b/weed/server/common.go index 2054e1a84..634d5757c 100644 --- a/weed/server/common.go +++ b/weed/server/common.go @@ -250,6 +250,11 @@ func handleStaticResources2(r *mux.Router) { } func adjustHeaderContentDisposition(w http.ResponseWriter, r *http.Request, filename string) { + responseContentDisposition := r.FormValue("response-content-disposition") + if responseContentDisposition != "" { + w.Header().Set("Content-Disposition", responseContentDisposition) + return + } if filename != "" { contentDisposition := "inline" if r.FormValue("dl") != "" {