Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

rest: fix missing error check

Lars Lehtonenc93e0ff8ee21
diff --git a/lib/rest/rest.go b/lib/rest/rest.go
index 1a746f090..0cdccf028 100644
--- a/lib/rest/rest.go
+++ b/lib/rest/rest.go
@@ -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
}