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

Media type for Upload Appending Procedure #2610

Open
Acconut opened this issue Aug 3, 2023 · 3 comments
Open

Media type for Upload Appending Procedure #2610

Acconut opened this issue Aug 3, 2023 · 3 comments

Comments

@Acconut
Copy link
Member

Acconut commented Aug 3, 2023

During IETF 117, it was noted that PATCH requests need to specify some media type, so our Upload Appending Procedure needs one as well. This could either be one from the byte range draft (#2501) or a custom one. For example, in the tus uploading protocol we use the content type application/offset+octet-stream to indicate that it is an undefined byte sequence that should be applied at a specific offset (as defined in the request).

@Acconut
Copy link
Member Author

Acconut commented Nov 6, 2023

I looked through the list of registered media types (https://www.iana.org/assignments/media-types/media-types.xhtml) to find if there is a media type that represents a file chunk without any additional metadata.

There is message/partial, but as far as I understand, it is meant for chunks of e-mail messages specifically, meaning it not suitable for chunks of files, in general.

Is there anybody aware of another existing media type? If not, we can propose registering application/offset+octet-stream or just going with application/octet-stream.

@Acconut
Copy link
Member Author

Acconut commented Feb 26, 2024

Is there anybody aware of another existing media type? If not, we can propose registering application/offset+octet-stream or just going with application/octet-stream.

application/octet-stream is too generic and does not describe the patch document properly.
application/offset+octet-stream does not fit because the suffix (delimited by the + has a specific meaning for MIME types).

How about a dedicated application/upload-chunk or application/partial-upload media type? It would mean that the corresponding content is a consecutive, partial chunk of an upload. In the draft we can then define that an upload resource can apply such a patch document by appending the data to the file on the server.

The IANA registry of media types already includes a similar media type in the vendor tree from Adobe for use in one of their web applications: application/vnd.adobe.partial-upload

@smatsson
Copy link

My two cents: I would avoid the word "chunk" as it's been a source of confusion in tus. There is ambiguity if it refers to part of the upload, a whole request (containing parts of the file and not the whole thing), part of the content of the request etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants