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
return x-amz-tag-count header when GET object.
ruitao.liu19026ae55d08
diff --git a/weed/s3api/filer_util_tags.go b/weed/s3api/filer_util_tags.goindex 3d4da7825b..fde8e243e8 100644--- a/weed/s3api/filer_util_tags.go+++ b/weed/s3api/filer_util_tags.go@@ -7,7 +7,7 @@ import ()const (- S3TAG_PREFIX = "s3-"+ S3TAG_PREFIX = "s3-tag-")func (s3a *S3ApiServer) getTags(parentDirectoryPath string, entryName string) (tags map[string]string, err error) {diff --git a/weed/server/filer_server_handlers_read.go b/weed/server/filer_server_handlers_read.goindex fbd45d6b98..ca584f9f68 100644--- a/weed/server/filer_server_handlers_read.go+++ b/weed/server/filer_server_handlers_read.go@@ -93,6 +93,19 @@ func (fs *FilerServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request,}}+ //set tag count+ if r.Method == "GET" {+ tagCount := 0+ for k, _ := range entry.Extended {+ if strings.HasPrefix(k, "s3-tag-") {+ tagCount+++ }+ }+ if tagCount > 0 {+ w.Header().Set("x-amz-tag-count", strconv.Itoa(tagCount))+ }+ }+// set etagetag := filer.ETagEntry(entry)if inm := r.Header.Get("If-None-Match"); inm == "\""+etag+"\"" {