diff --git a/php/elFinderVolumeDriver.class.php b/php/elFinderVolumeDriver.class.php index 37fdf7ef1..fbd3571e7 100644 --- a/php/elFinderVolumeDriver.class.php +++ b/php/elFinderVolumeDriver.class.php @@ -4919,7 +4919,13 @@ static protected function mimetypeInternalDetect($path = '') $pinfo = pathinfo($path); $ext = isset($pinfo['extension']) ? strtolower($pinfo['extension']) : ''; } - return ($ext && isset(elFinderVolumeDriver::$mimetypes[$ext])) ? elFinderVolumeDriver::$mimetypes[$ext] : 'unknown'; + $res = ($ext && isset(elFinderVolumeDriver::$mimetypes[$ext])) ? elFinderVolumeDriver::$mimetypes[$ext] : 'unknown'; + // Recursive check if MIME type is unknown with multiple extensions + if ($res === 'unknown' && strpos($pinfo['filename'], '.')) { + return elFinderVolumeDriver::mimetypeInternalDetect($pinfo['filename']); + } else { + return $res; + } } /**