Compare commits

..

1 commit

Author SHA1 Message Date
d14cb1f695 [#142] Fix multipart-objects download
All checks were successful
/ DCO (pull_request) Successful in 37s
/ Vulncheck (pull_request) Successful in 1m1s
/ Builds (pull_request) Successful in 1m33s
/ Lint (pull_request) Successful in 3m13s
/ Tests (pull_request) Successful in 1m15s
Signed-off-by: Nikita Zinkevich <n.zinkevich@yadro.com>
2024-09-19 08:35:01 +03:00

View file

@ -3,7 +3,6 @@ package handler
import (
"context"
"encoding/json"
"errors"
"fmt"
"io"
"strconv"
@ -77,14 +76,8 @@ func (h *Handler) getPayload(p getPayloadParams) (io.ReadCloser, uint64, error)
if !ok {
return p.obj.Payload, p.obj.Header.PayloadSize(), nil
}
cid, ok := p.obj.Header.ContainerID()
if !ok {
return nil, 0, errors.New("no container id set")
}
oid, ok := p.obj.Header.ID()
if !ok {
return nil, 0, errors.New("no object id set")
}
cid, _ := p.obj.Header.ContainerID()
oid, _ := p.obj.Header.ID()
size, err := strconv.ParseUint(sizeValue, 10, 64)
if err != nil {
return nil, 0, err