aboutsummaryrefslogtreecommitdiff
path: root/weed/s3api/s3api_bucket_handlers.go
diff options
context:
space:
mode:
authorSmsS4 <36403983+SmsS4@users.noreply.github.com>2023-05-16 20:09:43 +0330
committerGitHub <noreply@github.com>2023-05-16 09:39:43 -0700
commit17e91d29179a41131e2a707ac2c5e63be4a21530 (patch)
treece0aa8417e2c4d983b7f085b8f1498dc3bd4f9d4 /weed/s3api/s3api_bucket_handlers.go
parentb7f011f777bd9fa396a607e6228f43e3be5f5437 (diff)
downloadseaweedfs-17e91d29179a41131e2a707ac2c5e63be4a21530.tar.xz
seaweedfs-17e91d29179a41131e2a707ac2c5e63be4a21530.zip
Use filerGroup for s3 buckets collection prefix (#4465)
* Use filerGroup for s3 buckets collection prefix * Fix templates * Remove flags * Remove s3CollectionPrefix
Diffstat (limited to 'weed/s3api/s3api_bucket_handlers.go')
-rw-r--r--weed/s3api/s3api_bucket_handlers.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/weed/s3api/s3api_bucket_handlers.go b/weed/s3api/s3api_bucket_handlers.go
index 9a430b337..d4d81905d 100644
--- a/weed/s3api/s3api_bucket_handlers.go
+++ b/weed/s3api/s3api_bucket_handlers.go
@@ -104,7 +104,7 @@ func (s3a *S3ApiServer) PutBucketHandler(w http.ResponseWriter, r *http.Request)
return fmt.Errorf("list collections: %v", err)
} else {
for _, c := range resp.Collections {
- if bucket == c.Name {
+ if s3a.getCollectionName(bucket) == c.Name {
errCode = s3err.ErrBucketAlreadyExists
break
}
@@ -174,7 +174,7 @@ func (s3a *S3ApiServer) DeleteBucketHandler(w http.ResponseWriter, r *http.Reque
// delete collection
deleteCollectionRequest := &filer_pb.DeleteCollectionRequest{
- Collection: bucket,
+ Collection: s3a.getCollectionName(bucket),
}
glog.V(1).Infof("delete collection: %v", deleteCollectionRequest)
@@ -304,7 +304,7 @@ func (s3a *S3ApiServer) GetBucketLifecycleConfigurationHandler(w http.ResponseWr
s3err.WriteErrorResponse(w, r, s3err.ErrInternalError)
return
}
- ttls := fc.GetCollectionTtls(bucket)
+ ttls := fc.GetCollectionTtls(s3a.getCollectionName(bucket))
if len(ttls) == 0 {
s3err.WriteErrorResponse(w, r, s3err.ErrNoSuchLifecycleConfiguration)
return