mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-12 17:27:50 +02: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:
1 parent
f0b928ff5e
commit
8e9273db99
1 file changed
+5
@@ -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") != "" {
|
||||
|
||||
Reference in new issue
Block a user