[#53] Revert "[#51] object/put: Fix incorrect splited object streaming"

Revert commit 803ea345 that which spawned a duplication of the payload of
objects.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-09-29 12:02:21 +03:00 committed by Alex Vanin
parent 0a51263e72
commit 867f1d772d

View file

@ -1,7 +1,6 @@
package putsvc
import (
"bytes"
"context"
"crypto/ecdsa"
@ -43,8 +42,7 @@ func (t *remoteTarget) Close() (*transformer.AccessIdentifiers, error) {
id, err := c.PutObject(t.ctx, new(client.PutObjectParams).
WithObject(
t.obj.SDK(),
).
WithPayloadReader(bytes.NewReader(t.obj.GetPayload())),
),
client.WithTTL(1), // FIXME: use constant
)
if err != nil {