Provide new getMimeType method to circumvent issues when php fileinfo is not loaded on server
(cherry picked from commit 5821257)
Complete implementation of new getMimeType method to circumvent issues when php fileinfo is not loaded on server
(cherry picked from commit 6b41866)