mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-10-22 03:37:30 +08: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:
@@ -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