5 ms·
MIME type feels as if it is as intrinsic a property as something like file size. It is a property of the data itself, not a property that a person chooses for
by gorgoiler 6y ago
MIME type feels as if it is as intrinsic a property as something like file size. It is a property of the data itself, not a property that a person chooses for the file like, say, the file name.
Could you give an example where one would want to choose the MIME type of some data, from a selection of options?
- klodolph 6y ago"It is a property of the data itself," meaning, it's metadata. I'm in favor of preserving this metadata. You will sometimes need to change the MIME type of something. For example, if you use a text editor to create an HTML file, you'll want to change the MIME type to text/html. It's also nice to be able to mark *.h files as containing C or C++ code.
- gorgoiler 6y agoIt seems like you’ve misunderstood me? MIME-type is an intrinsic property which can be derived from the data itself. I have a cat. I can derive that it is a cat when the situation requires it. I don’t need to have a metadata label attached to it, in my own handwriting, saying “cat”.
- hibbelig 6y agoI argue that it’s not possible to determine the mime type of a file from its contents. For example the content could be malformed. An editor or IDE should still highlight it so the user can find the syntax error. Of course, for some files it is possible. But we need the metadata for the other files.
- kaba0 6y agoWell, they are bytes, not a cat. It can be interpreted as an image (in multiple formats) or text or whatever, so I don’t think this metaphor is apt.
- jcelerier 6y ago> It is a property of the data itself, not a property that a person chooses for the file like, say, the file name. I entirely disagree. If I have an empty .json or empty .bin or empty .txt I expect a different behaviour in the software that I am opening the file with, even if in all cases the actual data is zero bytes. More generally file formats can be polyglots: https://github.com/Polydet/polyglot-database https://github.com/Polydet/polyglot-database