Skip to content

Commit 449ec91

Browse files
author
Marius
authored
Clarify handling of empty uploads (#197)
Empty uploads with `Upload-Length: 0` were previously already allowed but this PR explicitly mentions them and provides more context on how to handle them. This change is based on a question from #196.
1 parent b671c1f commit 449ec91

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

protocol.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,10 @@ not known, the Server MUST set `Upload-Defer-Length: 1` in all responses to
359359
If the Server supports deferring length, it MUST add `creation-defer-length` to
360360
the `Tus-Extension` header.
361361

362+
The `Upload-Length` header MAY be set to 0, indicating that the Client wants to
363+
upload an empty file. Such an upload is immediately complete after its creation without
364+
transferring data using `PATCH` requests.
365+
362366
The Client MAY supply the `Upload-Metadata` header to add additional metadata to the
363367
upload creation request. The Server MAY decide to ignore or use this information to
364368
further process the request or to reject it. If an upload contains additional

0 commit comments

Comments
 (0)