Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Resumable (tus) upload creation with Upload-Length: 0 returns 404 with no explanation

Open
#1,300 1 comment 0 reactions 1 assignee View on GitHub

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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from supabase/storage

All issues in supabase/storage

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.