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
escape file name when there is a quote inside
Chris Luc35fe9d6318e
diff --git a/weed-fs/src/cmd/weed/volume.go b/weed-fs/src/cmd/weed/volume.goindex 4d3737dbd4..59a5623ea2 100644--- a/weed-fs/src/cmd/weed/volume.go+++ b/weed-fs/src/cmd/weed/volume.go@@ -42,6 +42,8 @@ var (store *storage.Store)+var fileNameEscaper = strings.NewReplacer("\\","\\\\","\"","\\\"")+func statusHandler(w http.ResponseWriter, r *http.Request) {m := make(map[string]interface{})m["Version"] = VERSION@@ -147,7 +149,7 @@ func GetHandler(w http.ResponseWriter, r *http.Request) {w.Header().Set("Content-Type", mtype)}if n.NameSize > 0 {- w.Header().Set("Content-Disposition", "filename="+string(n.Name))+ w.Header().Set("Content-Disposition", "filename="+fileNameEscaper.Replace(string(n.Name)))}if ext != ".gz" {if n.IsGzipped() {