https://github.com/victor-o-silva/db_file_storage captures the content_type from the File object, and stores it as part of the file.
Some other binary database files also (optionally) use "magic" to detect the mime type, such as the wrapper https://pypi.org/project/python-magic/ .
Currently the code only uses mimetypes in the views to detect the mime-type based on the name, but that doesnt allow for more explicit control , such as application/vnd.open-api+yaml
https://github.com/victor-o-silva/db_file_storage captures the
content_typefrom the File object, and stores it as part of the file.Some other binary database files also (optionally) use "magic" to detect the mime type, such as the wrapper https://pypi.org/project/python-magic/ .
Currently the code only uses
mimetypesin the views to detect the mime-type based on the name, but that doesnt allow for more explicit control , such asapplication/vnd.open-api+yaml