Hi, to get the personal mimetypemapping.json changes effective for existing files, you have to rescan your files. No need to execute “update-js” command.
To do it :
sudo -u www-data php /var/www/html/nextcloud/occ files:scan --all
I guess your files that were opened correctly were created after your mimetypemapping.json modification.
Is it ok now ?