rest: fix missing error check

s3-about
Lars Lehtonen 2019-09-13 15:50:39 -07:00 committed by Nick Craig-Wood
parent 3b91fb6a2f
commit c93e0ff8ee
1 changed files with 3 additions and 0 deletions

View File

@ -444,6 +444,9 @@ func (api *Client) callCodec(ctx context.Context, opts *Opts, request interface{
var overhead int64
opts.Body, opts.ContentType, overhead, err = MultipartUpload(opts.Body, params, opts.MultipartContentName, opts.MultipartFileName)
if err != nil {
return nil, err
}
if opts.ContentLength != nil {
*opts.ContentLength += overhead
}