From e439c7031a9b72b9fd24c32235680462f48b5a67 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Mon, 29 Dec 2025 23:35:41 -0800 Subject: [PATCH] Fix bucket name case sensitivity in remote gateway (#7910) Remove strings.ToLower conversion that was forcing bucket names to lowercase when creating remote storage buckets. This preserves case consistency between local filer paths and remote bucket names. The previous behavior converted bucket names like "MyBucket" to "mybucket" for remote storage, creating a mismatch with the local filer directory name. Cloud providers like AWS S3 support mixed-case bucket names and will enforce their own naming rules if needed. Fixes: https://github.com/seaweedfs/seaweedfs/discussions/7910 --- weed/command/filer_remote_gateway_buckets.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/weed/command/filer_remote_gateway_buckets.go b/weed/command/filer_remote_gateway_buckets.go index 5c7e0ae21..09e06b768 100644 --- a/weed/command/filer_remote_gateway_buckets.go +++ b/weed/command/filer_remote_gateway_buckets.go @@ -3,6 +3,12 @@ package command import ( "context" "fmt" + "math" + "math/rand" + "path/filepath" + "strings" + "time" + "github.com/seaweedfs/seaweedfs/weed/filer" "github.com/seaweedfs/seaweedfs/weed/glog" "github.com/seaweedfs/seaweedfs/weed/pb" @@ -12,11 +18,6 @@ import ( "github.com/seaweedfs/seaweedfs/weed/replication/source" "github.com/seaweedfs/seaweedfs/weed/util" "google.golang.org/protobuf/proto" - "math" - "math/rand" - "path/filepath" - "strings" - "time" ) func (option *RemoteGatewayOptions) followBucketUpdatesAndUploadToRemote(filerSource *source.FilerSource) error { @@ -100,7 +101,7 @@ func (option *RemoteGatewayOptions) makeBucketedEventProcessor(filerSource *sour return err } - bucketName := strings.ToLower(entry.Name) + bucketName := entry.Name if *option.include != "" { if ok, _ := filepath.Match(*option.include, entry.Name); !ok { return nil