-
Notifications
You must be signed in to change notification settings - Fork 101
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
Add Creation With Upload extension #88
Changes from 1 commit
8514ca1
e9fdbd4
e31012e
2cf1ec9
0ed3a96
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -351,6 +351,20 @@ If the length of the upload exceeds the maximum, which MAY be specified using | |
the `Tus-Max-Size` header, the Server MUST respond with the | ||
`413 Request Entity Too Large` status. | ||
|
||
The Client MAY include the entire or a chunk of the data, which is meant to be | ||
uploaded, in the body of the `POST` request. In this case, similar rules as for | ||
the `PATCH` request and response apply. The Client MUST include the | ||
`Content-Type: application/offset+octet-stream` header. The Server SHOULD accept | ||
as many bytes as possible and MUST include the `Upload-Offset` in the response | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
and MUST set its value to the offset of the upload after applying the accepted | ||
bytes. If the Server supports the functionality described in this paragraph, it | ||
MUST advertise this by including the `creation-with-chunk` value to the | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think |
||
`Tus-Extension` header. The Client SHOULD verify that the Server is capable of | ||
handling this cases before sending the `POST` request. In addition, the Client | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What if we said: If not, I believe it should be either "this case" or "these cases" |
||
SHOULD include the `Expect: 100-continue` header in the request to receive | ||
early feedback from the Server whether it will accept the creation request | ||
before attempting to transfer the first chunk. | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we simplify this to say: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the current sentence should be kept as it also explains which type of feedback is provided by the server. |
||
The Server MUST acknowledge a successful upload creation with the `201 Created` | ||
status. The Server MUST set the `Location` header to the URL of the created | ||
resource. This URL MAY be absolute or relative. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about this wording?
The Client MAY include the entirety or a chunk of the data to be uploaded in the body of the
POST
request.