Adding a new custom mimetype

Is there a way to add a custom mime-type to the files menu? I have seen this question asked here before but not a solution.

Look at this section of the NC documentation which describes how to do mime mapping and aliases. Hope that helps.

https://docs.nextcloud.com/server/11/admin_manual/configuration_mimetypes/index.html

Not really, I want my application to add the type on install. I found someone trying to do this with keeweb app, but when I tried to do his method of the “migration” steps on install/uninstall it only sometimes works. More interestingly it only randomly works. Sometimes a file shows up, other times the file’s mimetype is not set. So I am wondering if this is a bug in nextcloud.

Yes, it really help if Nextcloud would provide a way for apps to register their MIME types on installation (similar to database tables). But as far I know there is not API for this yet. That’s the reason why Ownpad and Audioplayer explain in their documentation how add the required MIME type mapping for the apps to work. I also added a custom MIME type for “.drawio” to Drawio and added documentation to Keeweb to explain how to connect “.kdbx” with Keeweb.