Compare commits
1 commit
33dba5d68c
...
d14cb1f695
Author | SHA1 | Date | |
---|---|---|---|
d14cb1f695 |
1 changed files with 2 additions and 9 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue