From 8fd51ccb0f87416160a6762b16f1e1dc2d11b690 Mon Sep 17 00:00:00 2001 From: Evgenii Baidakov Date: Mon, 3 Mar 2025 10:54:40 +0400 Subject: [PATCH] layer: Filter meta objects for tags Signed-off-by: Evgenii Baidakov --- api/layer/layer.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/layer/layer.go b/api/layer/layer.go index fdfc4b99..1f51d2c1 100644 --- a/api/layer/layer.go +++ b/api/layer/layer.go @@ -20,6 +20,7 @@ import ( "github.com/nspcc-dev/neofs-s3-gw/api/data" "github.com/nspcc-dev/neofs-s3-gw/api/layer/encryption" "github.com/nspcc-dev/neofs-s3-gw/api/s3errors" + "github.com/nspcc-dev/neofs-s3-gw/api/s3headers" "github.com/nspcc-dev/neofs-s3-gw/creds/accessbox" "github.com/nspcc-dev/neofs-sdk-go/bearer" "github.com/nspcc-dev/neofs-sdk-go/client" @@ -789,8 +790,11 @@ func (n *layer) GetIDForVersioningContainer(ctx context.Context, p *ShortInfoPar opts.WithBearerToken(*bt) } + // prm.Attributes[s3headers.MetaType] = s3headers.TypeTags + filters.AddFilter(object.AttributeFilePath, p.Object, object.MatchStringEqual) filters.AddTypeFilter(object.MatchStringEqual, object.TypeRegular) + filters.AddFilter(s3headers.MetaType, "", object.MatchNotPresent) if !p.FindNullVersion { filters.AddFilter(attrS3VersioningState, data.VersioningEnabled, object.MatchStringEqual)