Re: [media-types] Feedback on a potential media type for upload chunks

Harald Alvestrand <harald@alvestrand.no> Thu, 07 March 2024 19:56 UTC

Return-Path: <harald@alvestrand.no>
X-Original-To: media-types@ietfa.amsl.com
Delivered-To: media-types@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A0212C14F5FC for <media-types@ietfa.amsl.com>; Thu, 7 Mar 2024 11:56:33 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.113
X-Spam-Level:
X-Spam-Status: No, score=-1.113 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=no autolearn_force=no
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kpt7GJzP6k7u for <media-types@ietfa.amsl.com>; Thu, 7 Mar 2024 11:56:29 -0800 (PST)
Received: from smtp.alvestrand.no (unknown [IPv6:2a01:4f9:c010:a44b::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 3151EC14F5F4 for <media-types@ietf.org>; Thu, 7 Mar 2024 11:56:28 -0800 (PST)
Received: from [10.196.203.173] (112-196.icannmeeting.org [199.91.196.112]) by smtp.alvestrand.no (Postfix) with ESMTPSA id 510ED4E2CA; Thu, 7 Mar 2024 20:56:24 +0100 (CET)
Message-ID: <638d18d6-439e-44fd-a172-3f8dcde7a7c2@alvestrand.no>
Date: Thu, 07 Mar 2024 15:56:22 -0400
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: en-US
To: Mark Nottingham <mnot@mnot.net>
Cc: media-types@ietf.org
References: <CANY19Nuq1NROzfOytcVJFBMN5cSisPzt_YH6NxRRinjwLg1rkg@mail.gmail.com> <939d9892-9512-4685-9476-3546529d372b@alvestrand.no> <216EA7D9-692D-4AA3-9C59-47EAB7B5EE22@mnot.net> <b1873ef8-8ccb-435a-9dab-df629314e88f@alvestrand.no> <3916F0BA-395F-4DD6-84EE-CFE147FA062C@mnot.net>
From: Harald Alvestrand <harald@alvestrand.no>
In-Reply-To: <3916F0BA-395F-4DD6-84EE-CFE147FA062C@mnot.net>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/media-types/CpRAvrpBHeNO-d00N4-x_nRlrdA>
Subject: Re: [media-types] Feedback on a potential media type for upload chunks
X-BeenThere: media-types@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: "IANA mailing list for reviewing Media Type \(MIME Type, Content Type\) registration requests." <media-types.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/media-types>, <mailto:media-types-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/media-types/>
List-Post: <mailto:media-types@ietf.org>
List-Help: <mailto:media-types-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/media-types>, <mailto:media-types-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 07 Mar 2024 19:56:33 -0000

On 3/6/24 17:51, Mark Nottingham wrote:
> Yes, it's used by many APIs, etc.

with a common spec? what types do they use?

the best thing for a new requirement is if we can just have 
documentation of something already common practice.


> Cheers,
>
>
>> On 7 Mar 2024, at 03:55, Harald Alvestrand <harald@alvestrand.no> wrote:
>>
>>
>> On 2/28/24 18:24, Mark Nottingham wrote:
>>> PATCH _requires_ that the media type identifies the semantics of the body, so applciation/octet-stream is not suitable; it does not tell the receiving server what to do with those bytes.
>>>
>>> See:
>>>    https://www.rfc-editor.org/rfc/rfc5789.html#section-2
>> sigh ... I was hoping that application/octet-stream with range: would suffice for the simple case :-(
>>
>> Is there any current deployment of PATCH in the wild?
>>
>>>
>>> Cheers,
>>>
>>>
>>>> On 28 Feb 2024, at 23:43, Harald Alvestrand <harald@alvestrand.no> wrote:
>>>>
>>>> If the interpretation of a partial upload is simply a sequence of bytes, I would strongly suggest using application/octet-stream.
>>>>
>>>> The semantics ("append this to the current upload") seem to be related to the request, not the media.
>>>>
>>>> Some other considerations apply for files that are (for instance) uploaded in chunks, where each chunk is required to be semantically complete in some syntax (video frames for instance). In that case, registering a media type for "sequence of instances of type X that can usefully be concatenated with another sequence of instances of type X" - but this would strongly depend on exactly the file being transferred, not on the fact that this is done using a PATCH mechanism.
>>>>
>>>> Hope this viewpoint is useful!
>>>>
>>>>
>>>> On 2/26/24 20:01, Marius Kleidl wrote:
>>>>> Dear working group,
>>>>> in the HTTP working group, we are discussing a draft for resumable uploads over HTTP (https://datatracker.ietf.org/doc/draft-ietf-httpbis-resumable-upload/ <https://datatracker.ietf.org/doc/draft-ietf-httpbis-resumable-upload/>). Essentially, for each file that should be uploaded, a new upload resource is created on the server. The client can then append data to this upload resource by sending a PATCH request. If the transfer gets interrupted, the client can query the upload resource's current offset and then resume the upload by appending the remaining data using another PATCH request.
>>>>> As required by RFC 5789, PATCH requests must include a media type to describe the message content. In the case of resumable uploads, the content is just a partial chunk from the file to be uploaded without any additional data included in the message content (no offset or length value). This chunk might be textual or binary depending on the file that should be uploaded (e.g. text file or video).
>>>>> I didn't find a registered media type in the standards tree which matches those semantics. However, the vendor tree includes application/vnd.adobe.partial-upload (https://www.iana.org/assignments/media-types/application/vnd.adobe.partial-upload <https://www.iana.org/assignments/media-types/application/vnd.adobe.partial-upload>), which was registered by Adobe in 2009 for uploads in their web applications. Its intention seems to align with the content included in PATCH requests for resumable uploads.
>>>>> Therefore, I am thinking about a standardized media type to describe partial chunks from an upload, such as application/partial-upload or application/upload-chunk and would love any feedback on that idea.
>>>>> Best regards
>>>>> Marius Kleidl
>>>>> _______________________________________________
>>>>> media-types mailing list
>>>>> media-types@ietf.org
>>>>> https://www.ietf.org/mailman/listinfo/media-types
>>>> _______________________________________________
>>>> media-types mailing list
>>>> media-types@ietf.org
>>>> https://www.ietf.org/mailman/listinfo/media-types
>>> --
>>> Mark Nottingham   https://www.mnot.net/
>>>
> --
> Mark Nottingham   https://www.mnot.net/
>