-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Migrate to using mimetypes as identifiers instead of all-caps Litteral str
Describe the solution you'd like
Transition away from using raw strings as the filetype identifiers. This would standardize what plugins should expect to receive or produces.
- have the shape of
'type/subtype'ieapplication/java-archive
The one area that has been identified as a concern is being handling ambiguity and not having different file types map to the same mimetypes. This would need a little work but could be implemented by exposing some utility functions to the plugins. Additionally for compatiblity with older custom plugins their could be a centralized map of the older used identifies to the new equivalent mimetypes
Additional context
- Python stdlib mimetypes https://docs.python.org/3/library/mimetypes.html
- Polyfile uses them https://github.com/trailofbits/polyfile/blob/5b7dc0c66a65a7c22a783395e669fe6b964753d0/polyfile/polyfile.py#L220
- https://www.iana.org/assignments/media-types/media-types.xhtml
- https://datatracker.ietf.org/doc/rfc2046/
- This spdx v3 uses this in their mediatype type: spdx-spec MediaType
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request