Closed bradh closed 6 years ago
Would it work to modify the language in the Media Types section to allow for commonly used vendor and unregistered media types? Perhaps something like: "A section describing the media types to be used is mandatory for any standard involving data encodings. If no suitable IANA Media Type exists in http://www.iana.org/assignments/media-types/index.html then this section may be used to specify another widely-deployed media type or define a new media type for registration with IANA."
Also wondering how often consumers would also (or primarily) read the initial bytes of a file to determine the mime type of the file vs. relying solely on the information in content_type
?
We'd need to define "widely-deployed" to make that testable. Maybe a supplemental list, but I worry about endless updates.
I think the best we will be able to do is to make the column mandatory (not null). We can then recommend an IANA MIME Type, falling back to another commonly used type if an official one is not available. Anything stronger isn't going to be testable.
During the conference call today, we agreed to leave the requirement alone but to discuss this as part of the ER. https://github.com/opengeospatial/gpkg-rte-ie-er/issues/5
Media related attribute tables must contain a
content_type
that is not null. However there are not defined MIME types for all document types (e.g. audio/wav is not defined, even though it is commonly used).There is always an option for
application/octet-stream
, but the user experience for that will likely be terrible (file "save as", at best). Another alternative would be to allow it to be null (which would correspond to HTTP Content-Type behaviour). User experience will be equally terrible.We could allow dropping a file extension into
content_type
(so ".wav" instead of "audio/wav"). That would be more complexity for the consumer side, but it would be easy to detect - string starts with.
or string contains/
depending on exactly how we wrote the file extension part. I'm not sure how that would impact on mobile clients, but don't see any issue at this point.