Bulk upload keeps uploading every file after the session is gone, without telling the user
Maintainers usually reply within 1 day
@leon-wbr is already working on this.
Since Nov 18, 2026.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- nextjs, react, typescript
- Domain
- authentication, frontend
Research direction
Start with the bulk upload flow in FormsManager and the e2e cases in test/uploads/e2e.spec.ts at lines 2275–2359. Run the tests for 401, 403, and 403 without a JSON body to see how the queue handles each response. Done means the first 401 or 403 stops uploads, leaves unsent files in the drawer, and shows one error; linked pull request #19725 is already open.
Written by the indexing model from the issue text.
Description
Describe the Bug
In the admin bulk upload (FormsManager), if the auth cookie disappears mid-queue (here the browser dropped it; a server-side session revoke or expiry does the same), every remaining POST /api/{upload collection} returns 403 You are not allowed to perform this action. The bulk uploader shows that per-file toast and moves on to the next file. Each request still sends the whole file body before being refused, so a 34-file queue of 15–25 MB photos spent 22 minutes uploading ~600 MB that was all rejected. The user saw "Uploading 33 of 34" and a stream of identical errors, with no hint that signing in again would fix it.
Expected: on the first 401 or 403, stop the queue, keep the unsent files in the drawer and show the error once, so the user can sign in again and press Save for the rest.
Related: #18161 (a rejected request or non-JSON error response is swallowed and the file is counted as saved).

Link to the code that reproduces this issue
Reproduction Steps
The linked e2e tests reproduce it in Payload's own test/uploads suite ("bulk uploads › on a 401 or 403 › should stop uploading and keep the remaining files on a 401" / "… on a 403" / "… on a 403 without a JSON body"). Against main (without the fix in the linked branch) all three fail: with a JSON error the toast appears once per remaining file instead of once, and with an HTML body the refused files are counted as saved.
Manually:
- Sign in to the admin and open any upload collection.
- Bulk upload several files (larger files make it obvious).
- While the queue runs, sign out in another tab (or delete the
payload-tokencookie). - Every remaining file is still uploaded in full and refused with 403, one toast per file; the queue never stops.
Which area(s) are affected? (Select all that apply)
area: ui
Environment Info
Payload: 3.92.1 and 3.93.0 (FormsManager is identical in both and on main)
Node.js: 24.22.1
Next.js: 16.4.6
Database: d1-sqlite, on Cloudflare Workers (reproduced with sqlite in Payload's test suite)
Browser: Chrome
- Dominant language
- TypeScript
- Stars
- 45.8k
- Forks
- 4.4k
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 251
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from payloadcms/payload
-
db-d1-sqlite: upsert is aliased to updateOne, so payload.kv.set never inserts new keysPossibly taken @pcbeingused333 claimed this today. OpenBug db: d1-sqlite Payload OSS
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
payloadcms/payload#19766 ·
Maintainers usually reply within 1 day
-
Document bar (.doc-controls__content) overflows a 375 px viewport, clips "Created" and fails axe scrollable-region-focusablePossibly taken A pull request linked to this issue is open or already merged. Openarea: ui Bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
payloadcms/payload#19690 ·
Maintainers usually reply within 1 day
-
[v4] Blocks thumbnails croped 3:2Possibly taken @samiarif02 claimed this 2 days ago. Openarea: ui Bug Payload OSS status: needs-triage v3
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
payloadcms/payload#19609 ·
Maintainers usually reply within 1 day
-
Scheduled publish jobs are not deleted when their document is deleted (string id in the job, raw id in the cleanup)Possibly taken @volodymyrshk claimed this 10 days ago. Openarea: core Bug db: sqlite
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
payloadcms/payload#19448 ·
Maintainers usually reply within 1 day
-
plugin-multi-tenant: `isGlobal` collections redirect tenant-scoped users to `/admin` since 3.93.0 (GlobalViewRedirect prop-name mismatch)Possibly taken @JarrodMFlesch claimed this 10 days ago. OpenBug plugin: multi-tenant
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
payloadcms/payload#19420 · 1 assignee ·
Maintainers usually reply within 1 day
All issues in payloadcms/payload
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
milind-soni/OpenMausBot#6730 ·
Maintainers usually reply within 1 day
-
`@angular/[email protected]` depends on vulnerable Vite 7.3.7 - GHSA-p4f5-76q4-ffq7 (Critical RCE)Openarea: @angular/build
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
angular/angular-cli#34764 ·
Maintainers usually reply within 1 day
-
status/need-triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
google-gemini/gemini-cli#30384 · 1 comment ·
Maintainers usually reply within 1 day
-
P2
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
area:image documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day