Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PATCH creation and Upload-Type #99

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,10 @@ bytes contained in the message at the given offset specified by the
`Upload-Offset` header. All `PATCH` requests MUST use
`Content-Type: application/offset+octet-stream`.

If the Request-URI does not point to an existing resource, the server MAY create
a new resource if the request fullfills the preconditions of a corresponding
`POST` request.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If precondition term is used here in the same sense as in HTTP protocol specification, a set of validators for a resource state should be specified. Otherwise the term should be expanded in more clear way.

The `Upload-Offset` header's value MUST be equal to the current offset of the
resource. In order to achieve parallel upload the
[Concatenation](#concatenation) extension MAY be used. If the offsets do not
Expand Down Expand Up @@ -338,6 +342,8 @@ Once set the length MUST NOT be changed. As long as the length of the upload is
not known, the Server MUST set `Upload-Defer-Length: 1` in all responses to
`HEAD` requests.

c) `Upload-Type` to indicate the mime type of the uploaded file.

If the Server supports deferring length, it MUST add `creation-defer-length` to
the `Tus-Extension` header.

Expand Down