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
simplify the gzip optimization logic
Chris Lu4beaaa065052
diff --git a/weed/storage/needle.go b/weed/storage/needle.goindex 82ba2fb6a5..29e70ff10c 100644--- a/weed/storage/needle.go+++ b/weed/storage/needle.go@@ -144,11 +144,13 @@ func ParseUpload(r *http.Request) (isGzipped = true}if ext == ".gz" {- isGzipped = true- }- if strings.HasSuffix(fileName, ".gz") &&- !strings.HasSuffix(fileName, ".tar.gz") {- fileName = fileName[:len(fileName)-3]+ if strings.HasSuffix(fileName, ".css.gz") ||+ strings.HasSuffix(fileName, ".html.gz") ||+ strings.HasSuffix(fileName, ".txt.gz") ||+ strings.HasSuffix(fileName, ".js.gz") {+ fileName = fileName[:len(fileName)-3]+ isGzipped = true+ }}}modifiedTime, _ = strconv.ParseUint(r.FormValue("ts"), 10, 64)