forked from TrueCloudLab/rclone
ulozto: set Content-Length header if the file size is known.
This commit is contained in:
parent
7c20ec3772
commit
748c43d525
1 changed files with 5 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue