[BUGFIX] Update file type on mimetype change

If the mime type of a file has changed, the type property of a file
will be updated, too.

Resolves: #54305
Releases: 6.2
Change-Id: I013e2adbbb3d3cd3973ab50c8e88806b9477fe90