Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

drive: fix chunked upload (#2030)

Fabian Möller1aa482c3336b
diff --git a/backend/drive/upload.go b/backend/drive/upload.go
index a3efc006d..19cda9994 100644
--- a/backend/drive/upload.go
+++ b/backend/drive/upload.go
@@ -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")