[v3] gdrive.files.list doesnt allow pageSize > 100
See original GitHub issue> gdrive.files.list({
auth: client,
userId: accountId,
pageToken: nextPageToken,
pageSize: 200, // tried 1000 as well as the documentation says pageSize can be within range of [1,1000]
// orderBy: 'modifiedTime', // tried this option as well to see if it helped... it didnt
}, function (err, result) {
console.log(result.files.length)
})
100
my account has thousands of files, i actually had this function in a recursive function where if there was a nextPageToken
i would call gdrive.files.list again. every time it would only return between [0, 100].
here is a reference to the gdrive v3 api https://developers.google.com/drive/v3/reference/files/list
pageSize integer The maximum number of files to return per page. Acceptable values are 1 to 1000, inclusive. (Default: 100)
is there some hidden condition to be able to get more than 100 files in a single api call?
Thanks!
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Google drive API files list size <= 100 when specify fields ...
This is normal due to the limit of characters. The limit is dependent on both the server and the client used so when...
Read more >Files: list | Google Drive
The list of files. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched....
Read more >Search files with Google Drive api v3 - Daimto
The Google Drive API v3 file.list method has a parameter called Q which will allow us to search for files within a users...
Read more >Display the first 100 files & folders in your Google Drive
Ability to create source files with either a code editor or shell commands. Basic skills in Python (2 or 3), but you can...
Read more >Upload and Download files from Google Drive storage using ...
It is a REST API that allows you to leverage Google Drive storage from within your app or program. So, let's go ahead...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Apparently this only happens if
files(permissions)
is added to the field string.I had the same problem and solved it by adding
maxResults:1000
so in the end i had
pageSize:1000, maxResults:1000