Skip to content

Commit

Permalink
Clarify handling of empty uploads
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Acconut authored Apr 23, 2024
1 parent b671c1f commit 83fdb60
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,10 @@ not known, the Server MUST set `Upload-Defer-Length: 1` in all responses to
If the Server supports deferring length, it MUST add `creation-defer-length` to
the `Tus-Extension` header.

The `Upload-Length` header MAY be set to 0, indicating that the Client wants to
upload an empty file. Such an upload is immediately complete after its creation without
transferring data using `PATCH` requests.

The Client MAY supply the `Upload-Metadata` header to add additional metadata to the
upload creation request. The Server MAY decide to ignore or use this information to
further process the request or to reject it. If an upload contains additional
Expand Down

0 comments on commit 83fdb60

Please sign in to comment.