Browse Source

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
fix-bucket-name-case-7910
Chris Lu 1 month ago
parent
commit
e439c7031a
  1. 13
      weed/command/filer_remote_gateway_buckets.go

13
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

Loading…
Cancel
Save