mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
s3: use "response-content-disposition" to overwrite default content-disposition
fix one part of https://github.com/chrislusf/seaweedfs/issues/2371 see https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html
This commit is contained in:
parent
f0b928ff5e
commit
8e9273db99
|
@ -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") != "" {
|
||||
|
|
Loading…
Reference in a new issue