I am trying to map some custom extensions to MIME types but it looks like it isn’t reading the new config file.
I have created the file /var/www/nextcloud/config/mimetypemapping.json with the content:
/var/www/nextcloud/config/mimetypemapping.json
{ "nfo": ["application/xml", "text/code", "text/plain"], "tbn": ["image/jpeg"] }
The images shown for those 2 extensions are still the default ‘file.svg’ icon. Is there something I am missing?
Hello,
if the file was already existing before, it is indexed in oc_filecache with the previous mapping. changing the mapping-file will only work for new files.
to apply this to already existing files, you need to run the occ if I am not wrong
https://docs.nextcloud.org/server/9/admin_manual/configuration_mimetypes/mimetype_aliases.html
Updated the link to point to our docs
@z000ao8q Thanks for that tip. I did a rescan and now it shows it as expected. Cheers