I want to add a mime type to allow my visio documents recognized by Mayan. What are the steps to do that? Mayan says they are uploaded but they show as application/octet-stream instead of application/vnd.visio. I have also submitted an update to that mimetype to mimetype.io for the extension .vsdx
Since the file
based MIME type backend is the new default, adding new MIME type definitions should be as if adding them to the OS.
However there is no official procedure to do so using the Docker image.
The official Docker image provides two environment variables to run custom scripts.
MAYAN_DOCKER_SCRIPT_PRE_SETUP
and MAYAN_DOCKER_SCRIPT_POST_SETUP
.
MAYAN_DOCKER_SCRIPT_PRE_SETUP
calls your script before Mayan is configured (before it creates or upgrades the database). MAYAN_DOCKER_SCRIPT_POST_SETUP
calls your script after it is configured but just before it starts up.
Pointing this to a back script that you place in the Mayan main Docker volume should allow you to create the custom MIME type XMl file and call xdg-mime
to import it.