Subject: [media-types] Questions regarding Media Type Application

From: "Armin Schrenk" <[email-masked]>
Date: Tue, 02 Mar 2021 10:38:14 +0100

Hello,

on behalf of my company I'd like to register a few media types, but before making the application I have an open question:
Are there any restrictions regarding the file extension? Specifically, is it possible that different media types can share the same file extension?

Best Regards,
Armin

---

From: Henrik Andersson <[email-masked]>
Date: Tue, 2 Mar 2021 11:15:14 +0100

Armin Schrenk wrote:
> Hello,
>
> on behalf of my company I'd like to register a few media types, but
> before making the application I have an open question:
> Are there any restrictions regarding the file extension? Specifically,
> is it possible that different media types can share the same file
> extension?
>
>
> Best Regards,
> Armin
>
> _______________________________________________
> media-types mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/media-types

File extensions are considered supplementary information and are just
"nice to have". The mime registry does not attempt to regulate them in
any way. This includes not attempting to avoid multiple mime types
claiming the same file extension.

---

From: Manu Sporny <[email-masked]>
Date: Tue, 2 Mar 2021 09:08:54 -0500

On 3/2/21 5:15 AM, Henrik Andersson wrote:
> The mime registry does not attempt to regulate them in any way. This
> includes not attempting to avoid multiple mime types claiming the same file
> extension.

We're dealing with a similar issue for the Decentralized Identifier
specification (which can serialize the data model into JSON, JSON-LD, and CBOR).

We wanted a .did file extension for each type, BUT were concerned that some
operating systems associate file extension w/ media type... and would become
confused and use the wrong handler if someone tried to double-click open the
file (as the encoding could be one of 3 incompatible types).

So, we went with the ugly: .didjson, .didjsonld, and .didcbor file extensions

Did we do the right thing? Not asking from a registry standpoint, but from a
best practices standpoint.

-- manu

-- 
Manu Sporny - https://www.linkedin.com/in/manusporny/
Founder/CEO - Digital Bazaar, Inc.
blog: Veres One Decentralized Identifier Blockchain Launches
https://tinyurl.com/veres-one-launches

---

From: Alexey Melnikov <[email-masked]>
Date: Wed, 17 Mar 2021 17:32:16 +0000

Hi,

> claiming the same file extension.

This is partially true, however the same file extension shouldn't be 
used for incompatible media types, for example the same file extension 
shouldn't be used for an XML media type and a CBOR media type.

File extension is used to invoke an application that can parse and 
process the corresponding format. So it is Ok to use .json for a generic 
application/json and more specific vnd.vendorfoo.bar+json. It is also Ok 
to define a separate file extension for a more specific media type.

Best Regards,

Alexey

---

From: Alexey Melnikov <[email-masked]>
Date: Wed, 17 Mar 2021 17:33:31 +0000

Hi Manu,

> file (as the encoding could be one of 3 incompatible types).
Right, this is exactly the reason why you shouldn't reuse the same file 
extension for 3 different incompatible formats.
> best practices standpoint.

I believe you did the right thing.

Best Regards,

Alexey