-
Notifications
You must be signed in to change notification settings - Fork 4
Closed
Description
Summary
In production, TUS resumable upload initialization succeeds, but chunk upload fails.
POST /uploads returns 201, then PATCH /uploads/:id returns 405 Not Allowed.
This breaks PulseCam chunked uploads and surfaces an upload failure alert in the UI.
Affected Environment
- Environment: production (nginx proxy in front of Node/Express)
- URL: https://pulseclip.os.mieweb.org/
- Date observed: 2026-03-02
- Browser test via Playwright MCP
Steps to Reproduce
- Open https://pulseclip.os.mieweb.org/
- Start an upload flow that uses TUS resumable uploads.
- Observe network requests.
Actual Behavior
POST /uploads->201 CreatedPATCH /uploads/{uploadId}->405 Not Allowed- Browser console error:
Failed to load resource: the server responded with a status of 405 () - UI shows chunk upload failure and retry option.
Expected Behavior
PATCH /uploads/{uploadId} should be proxied to backend and return TUS-compliant response (e.g., 204 with updated Upload-Offset) until upload completion.
Evidence
Observed request sequence:
GET /api/about->200GET /api/providers->200GET /api/featured->200POST /uploads->201PATCH /uploads/{id}->405
Suspected Root Cause
Proxy/routing mismatch at nginx:
/uploadscreate route is reachable (POSTworks),- but method handling for
/uploads/:idlikely blocks or misroutesPATCH.
Possibilities: limit_exceptexcludesPATCH/uploadsmatched by static location instead of upstream proxy- method whitelist does not include TUS methods (
OPTIONS,HEAD,PATCH,DELETE)
Scope / Impact
- PulseCam mobile upload flow is functionally broken in production for resumable uploads.
- Standard non-TUS file upload may still work (separate
/api/uploadpath).
Proposed Fix
Update nginx config for /uploads to:
- Proxy all
/uploadstraffic to Node/Express upstream - Allow TUS methods:
OPTIONS,POST,HEAD,PATCH,DELETE - Keep request body streaming/size settings compatible with chunked uploads
- Preserve TUS headers (e.g.,
Tus-Resumable,Upload-Offset,Upload-Length,Upload-Metadata)
Acceptance Criteria
-
POST /uploadsreturns201in production -
PATCH /uploads/:idreturns non-405 and advancesUpload-Offset - Full TUS upload completes successfully end-to-end
- No console errors related to
/uploads/:id405 - UI upload flow no longer shows chunk upload failure
Optional Follow-ups
- Add proxy integration test or smoke check for TUS methods
- Add production health/synthetic check for resumable upload route and methods
- Document required reverse-proxy method support for TUS in deployment docs
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels