Resumable (tus) upload creation with Upload-Length: 0 returns 404 with no explanation
Maintainers usually reply within 1 day
@ferhatelmas is already working on this.
Since Aug 5, 2026.
Assessment
This issue has not been assessed yet.
Description
Summary
The resumable upload endpoint responds 404 Not Found to a creation POST
whose Upload-Length is 0. A zero-byte object is a degenerate but valid
tus upload; I'd expect either 201 Created (with the upload immediately
completable) or a meaningful 4xx with an error body naming the constraint.
The bare 404 is the real problem: it reads as "wrong endpoint" or "transient",
not "this request can never succeed". Retrying tus clients (aiotus in my
case) treat it as retryable and loop forever.
Repro
Against hosted storage (also reproduces on the local development stack):
curl -si -X POST "https://<project>.storage.supabase.co/storage/v1/upload/resumable" \
-H "Authorization: Bearer <service-role-key>" \
-H "Tus-Resumable: 1.0.0" \
-H "Upload-Length: 0" \
-H "Upload-Metadata: bucketName cmVjb3JkaW5ncw==,objectName emVyby5vZ2c=" \
# -> HTTP/2 404, no error body explaining the rejection
The identical request with Upload-Length: 1 (and one byte PATCHed) returns
201 and completes normally.
How this bit me
I upload call recordings via tus. Occasionally an upstream media failure
produces a zero-byte file, and my uploader — which bounds its shutdown flush
to 60 seconds so restarts don't lose recordings — spent that entire window
retrying a request that could never succeed. Nothing in the 404 indicates
permanence, so it took a while to trace the "storage outage" back to a
zero-length edge case. I now skip zero-byte uploads client-side, but the
failure mode was avoidable.
Ask
Either accept the zero-byte creation (201) or reject it with a descriptive
4xx (e.g. 422 and a body saying zero-length uploads are unsupported), and
document the constraint in the resumable-upload docs if it's intentional.
Either lets clients fail fast instead of retrying forever.
- Dominant language
- TypeScript
- Stars
- 1.3k
- Forks
- 307
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 71
Getting set up
- Ships a Dockerfile or Docker Compose file
- No 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 supabase/storage
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 62/100
supabase/storage#557 · 1 comment ·
Maintainers usually reply within 1 day
-
Local Storage TUS rejects signed upload token generated by the same stack with "Invalid Compact JWS"May be free again @TylerHillery claimed this 64 days ago, and no pull request is open. Openbug
supabase/storage#1268 · 2 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
Supabase Storage: multipart uploads and `x-upsert` rejected with a misleading RLS errorMay be free again @ferhatelmas claimed this 64 days ago, and no pull request is open. Openbug
supabase/storage#1241 · 3 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
Upload file content type charset is droppedMay be free again @ferhatelmas claimed this 240 days ago, and no pull request is open. Openaccepted bug
supabase/storage#816 · 6 comments · 1 assignee ·
Maintainers usually reply within 1 day
All issues in supabase/storage
Similar issues
-
area/core status/need-triage
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
google-gemini/gemini-cli#29602 ·
Maintainers usually reply within 1 day
-
area: backend enhancement priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
snapotter-hq/SnapOtter#1879 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Tencent/BrowserSkill#390 ·
Maintainers usually reply within 1 day
-
good first issue status: needs triaging type: bug version: 2.0
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
medusajs/medusa#17094 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 1 day