1
mirror of https://github.com/rclone/rclone synced 2024-09-21 19:31:31 +02:00

drive: fix chunked upload (#2030)

This commit is contained in:
Fabian Möller 2018-01-29 23:36:39 +01:00 committed by GitHub
parent 40af98b0b3
commit 1aa482c333
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,10 +58,11 @@ func (f *Fs) Upload(in io.Reader, size int64, contentType string, info *drive.Fi
params := make(url.Values)
params.Set("alt", "json")
params.Set("uploadType", "resumable")
params.Set("fields", partialFields)
if f.isTeamDrive {
params.Set("supportsTeamDrives", "true")
}
urls := "https://www.googleapis.com/upload/drive/v2/files"
urls := "https://www.googleapis.com/upload/drive/v3/files"
method := "POST"
if fileID != "" {
params.Set("setModifiedDate", "true")