mirror of
https://github.com/rclone/rclone.git
synced 2025-01-09 07:48:19 +01:00
ulozto: set Content-Length header if the file size is known.
This commit is contained in:
parent
7c20ec3772
commit
748c43d525
@ -346,6 +346,11 @@ func (f *Fs) uploadUnchecked(ctx context.Context, name, parentSlug string, info
|
|||||||
MultipartFileName: encodedName,
|
MultipartFileName: encodedName,
|
||||||
Parameters: url.Values{},
|
Parameters: url.Values{},
|
||||||
}
|
}
|
||||||
|
if info.Size() > 0 {
|
||||||
|
size := info.Size()
|
||||||
|
opts.ContentLength = &size
|
||||||
|
}
|
||||||
|
|
||||||
var uploadResponse api.SendFilePayloadResponse
|
var uploadResponse api.SendFilePayloadResponse
|
||||||
|
|
||||||
err = f.pacer.CallNoRetry(func() (bool, error) {
|
err = f.pacer.CallNoRetry(func() (bool, error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user