From 1d7ecbebeb15d30b10468aa4ef34299224a09e3c Mon Sep 17 00:00:00 2001 From: Evgenii Baidakov Date: Tue, 12 Sep 2023 11:16:29 +0400 Subject: [PATCH] neofs: Write object payload if exists Signed-off-by: Evgenii Baidakov --- internal/neofs/neofs.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/neofs/neofs.go b/internal/neofs/neofs.go index 5a8adbd1..9700cf66 100644 --- a/internal/neofs/neofs.go +++ b/internal/neofs/neofs.go @@ -259,6 +259,9 @@ func (x *NeoFS) CreateObject(ctx context.Context, prm layer.PrmObjectCreate) (oi var lock object.Lock lock.WriteMembers(prm.Locks) obj.WriteLock(lock) + + // we can't have locks and payload at the same time. + prm.Payload = bytes.NewReader(obj.Payload()) } var prmObjPutInit client.PrmObjectPutInit