drive: add team drive support - fixes #885

This commit is contained in:
Nick Craig-Wood
2017-06-04 22:38:29 +01:00
parent bdc19b7c8a
commit a5cfdfd233
3 changed files with 163 additions and 40 deletions
+3
View File
@@ -57,6 +57,9 @@ 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")
if f.isTeamDrive {
params.Set("supportsTeamDrives", "true")
}
urls := "https://www.googleapis.com/upload/drive/v2/files"
method := "POST"
if fileID != "" {