Skip to content

Browser upload fails with Cloudflare R2 for large files — POST Object returns 501 #1684

@webjuice1

Description

@webjuice1

Here are both issues:

Issue 1: Browser upload
Title: Browser upload fails with Cloudflare R2 for large files — POST Object returns 501
Description
When uploading large video files (tested with ~980MB) via the browser dashboard ("Import Video" → "Upload File"), the upload fails at approximately 35%.
The browser sends the file as a POST request with Content-Type: multipart/form-data directly to the R2 endpoint. Cloudflare R2 does not implement the S3 POST Object API, so it returns 501 Not Implemented.
Small files (tested up to ~2MB / 5-second recordings) upload successfully — these appear to use a different code path (presigned PUT via multipart upload).
Network tab evidence:

Request URL: https://.r2.cloudflarestorage.com/cap-recordings
Request Method: POST
Content-Type: multipart/form-data; boundary=...
Content-Length: 991933128 (991MB)
Status: 501 Not Implemented
Response: application/xml — R2 error page

Expected behavior: Large file uploads should use S3 multipart upload with presigned PUT URLs (same as the desktop app and small file uploads), not POST Object.
Reproduction

Self-host Cap Web with Cloudflare R2 as storage backend
Go to dashboard → Import Video → Upload File
Select a large video file (~500MB+)
Upload starts, progresses to ~35%, then fails
Network tab shows a single POST to the R2 endpoint returning 501

Additional Context

Cap web version: 0.3.1 (ghcr.io/capsoftware/cap-web:latest as of March 2026)
Browser: Chrome/Safari on macOS
Storage backend: Cloudflare R2 with S3_PATH_STYLE=true
Deployment: Coolify with docker-compose.coolify.yml
Small uploads work fine — issue is specific to large files where Cap switches from presigned PUT to POST Object

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions