forked from TrueCloudLab/rclone
drive: fix chunked upload (#2030)
This commit is contained in:
parent
40af98b0b3
commit
1aa482c333
1 changed files with 2 additions and 1 deletions
|
@ -58,10 +58,11 @@ func (f *Fs) Upload(in io.Reader, size int64, contentType string, info *drive.Fi
|
||||||
params := make(url.Values)
|
params := make(url.Values)
|
||||||
params.Set("alt", "json")
|
params.Set("alt", "json")
|
||||||
params.Set("uploadType", "resumable")
|
params.Set("uploadType", "resumable")
|
||||||
|
params.Set("fields", partialFields)
|
||||||
if f.isTeamDrive {
|
if f.isTeamDrive {
|
||||||
params.Set("supportsTeamDrives", "true")
|
params.Set("supportsTeamDrives", "true")
|
||||||
}
|
}
|
||||||
urls := "https://www.googleapis.com/upload/drive/v2/files"
|
urls := "https://www.googleapis.com/upload/drive/v3/files"
|
||||||
method := "POST"
|
method := "POST"
|
||||||
if fileID != "" {
|
if fileID != "" {
|
||||||
params.Set("setModifiedDate", "true")
|
params.Set("setModifiedDate", "true")
|
||||||
|
|
Loading…
Reference in a new issue