Skip to content

Commit

Permalink
increase max limits for list operations
Browse files Browse the repository at this point in the history
  • Loading branch information
mifi committed Apr 15, 2023
1 parent 90f7fb9 commit 16cf409
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/@uppy/companion/src/server/provider/drive/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ class Drive extends Provider {
fields: DRIVE_FILES_FIELDS,
pageToken: query.cursor,
q,
// pageSize: The maximum number of files to return per page.
// Partial or empty result pages are possible even before the end of the files list has been reached.
// Acceptable values are 1 to 1000, inclusive. (Default: 100)
pageSize: 1000,
// pageSize: 10, // can be used for testing pagination if you don't have many files
orderBy: 'folder,name',
includeItemsFromAllDrives: true,
Expand Down
11 changes: 10 additions & 1 deletion packages/@uppy/companion/src/server/provider/dropbox/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,16 @@ async function list ({ directory, query, token }) {
return getClient({ token }).post('files/list_folder/continue', { json: { cursor: query.cursor }, responseType: 'json' }).json()
}

return getClient({ token }).post('files/list_folder', { searchParams: query, json: { path: `${directory || ''}`, include_non_downloadable_files: false }, responseType: 'json' }).json()
return getClient({ token }).post('files/list_folder', {
searchParams: query,
json: {
path: `${directory || ''}`,
include_non_downloadable_files: false,
// min=1, max=2000 (default: 500): The maximum number of results to return per request.
limit: 2000,
},
responseType: 'json',
}).json()
}

async function userInfo ({ token }) {
Expand Down

0 comments on commit 16cf409

Please sign in to comment.