mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-25 19:23:55 +00:00
* fix: handle pagination for Google Photos picker (fixes #5765) * simplify --------- Co-authored-by: Mikael Finstad <finstaden@gmail.com>
This commit is contained in:
parent
388f7cfe1a
commit
c0eb40ae53
1 changed files with 1 additions and 1 deletions
|
|
@ -309,7 +309,7 @@ async function resolvePickedPhotos({
|
|||
do {
|
||||
const pageSize = 100
|
||||
const response = await fetch(
|
||||
`https://photospicker.googleapis.com/v1/mediaItems?${new URLSearchParams({ sessionId: pickingSession.id, pageSize: String(pageSize) }).toString()}`,
|
||||
`https://photospicker.googleapis.com/v1/mediaItems?${new URLSearchParams({ sessionId: pickingSession.id, pageSize: String(pageSize), ...(pageToken && { pageToken }) }).toString()}`,
|
||||
{ headers, signal },
|
||||
)
|
||||
if (!response.ok) throw new Error('Failed to get a media items')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue