Follow-up 42333412833a - Fix behaviour $wgVerifyMimeType = false;

Bug: 49717
Change-Id: If1d6e8fed575bf2816a10db066ec4e023460ee1e
(cherry picked from commit 337fd7790e8d5e3a9983225c56adcd8ea8d496e7)
(cherry picked from commit dadfe0ae9349dd0bf5e1d3bedc8887289818fda1)
(cherry picked from commit adcf34af1273dd5868b21f4268d56f856b4403e5)
(cherry picked from commit 622bc8a465e1f4df719841a2e75fb098f66e87ec)