mirror of
https://github.com/rclone/rclone
synced 2024-11-26 04:07:22 +01:00
Fix Multipart upload check
In the Documentation it states: // If (opts.MultipartParams or opts.MultipartContentName) and // opts.Body are set then CallJSON will do a multipart upload with a // file attached.
This commit is contained in:
parent
b68c3ce74d
commit
b9e16b36e5
@ -393,7 +393,7 @@ func (api *Client) callCodec(opts *Opts, request interface{}, response interface
|
|||||||
opts.Body = bytes.NewBuffer(requestBody)
|
opts.Body = bytes.NewBuffer(requestBody)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
isMultipart := (opts.MultipartParams != nil || opts.MultipartMetadataName != "") && opts.Body != nil
|
isMultipart := (opts.MultipartParams != nil || opts.MultipartContentName != "") && opts.Body != nil
|
||||||
if isMultipart {
|
if isMultipart {
|
||||||
params := opts.MultipartParams
|
params := opts.MultipartParams
|
||||||
if params == nil {
|
if params == nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user