SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
rename
Chris Lu3faa0aa4482f
diff --git a/weed/server/common.go b/weed/server/common.goindex 7fc4d45f3a..75fc3ad9e6 100644--- a/weed/server/common.go+++ b/weed/server/common.go@@ -218,7 +218,7 @@ func handleStaticResources2(r *mux.Router) {r.PathPrefix("/seaweedfsstatic/").Handler(http.StripPrefix("/seaweedfsstatic", http.FileServer(statikFS)))}-func adjustHeaders(w http.ResponseWriter, r *http.Request, filename string) {+func adjustHeaderContentDisposition(w http.ResponseWriter, r *http.Request, filename string) {if filename != "" {contentDisposition := "inline"if r.FormValue("dl") != "" {diff --git a/weed/server/filer_server_handlers_read.go b/weed/server/filer_server_handlers_read.goindex aef490ff4d..657158c2ff 100644--- a/weed/server/filer_server_handlers_read.go+++ b/weed/server/filer_server_handlers_read.go@@ -102,7 +102,7 @@ func (fs *FilerServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request,setEtag(w, etag)filename := entry.Name()- adjustHeaders(w, r, filename)+ adjustHeaderContentDisposition(w, r, filename)if r.Method == "HEAD" {w.Header().Set("Content-Length", strconv.FormatInt(int64(filer2.TotalSize(entry.Chunks)), 10))diff --git a/weed/server/volume_server_handlers_read.go b/weed/server/volume_server_handlers_read.goindex 1d1e0f1bb3..89b7445e94 100644--- a/weed/server/volume_server_handlers_read.go+++ b/weed/server/volume_server_handlers_read.go@@ -244,7 +244,7 @@ func writeResponseContent(filename, mimeType string, rs io.ReadSeeker, w http.Re}w.Header().Set("Accept-Ranges", "bytes")- adjustHeaders(w, r, filename)+ adjustHeaderContentDisposition(w, r, filename)if r.Method == "HEAD" {w.Header().Set("Content-Length", strconv.FormatInt(totalSize, 10))