1
0
mirror of https://github.com/rclone/rclone.git synced 2025-01-13 20:38:12 +02:00

drive: reduce bandwidth by adding fields for partial responses

Fixes #1346
This commit is contained in:
Martin Kristensen 2017-04-20 18:58:51 +02:00 committed by Nick Craig-Wood
parent 84d4d7f9d9
commit d7df065320

View File

@ -84,6 +84,7 @@ var (
"text/tab-separated-values": "tsv",
}
extensionToMimeType map[string]string
partialFields = googleapi.Field("items(id,downloadUrl,exportLinks,fileExtension,fullFileExtension,fileSize,labels,md5Checksum,modifiedDate,mimeType,title,owners)")
)
// Register with Fs
@ -242,7 +243,7 @@ OUTER:
for {
var files *drive.FileList
err = f.pacer.Call(func() (bool, error) {
files, err = list.Do()
files, err = list.Fields(partialFields).Do()
return shouldRetry(err)
})
if err != nil {