check filename extension by lowercased version of itself
This commit is contained in:
parent
06426bdfe6
commit
65ce0ff4e4
@ -513,6 +513,7 @@ function getMimeType($file, $ext="") {
|
|||||||
if ($type !== false && strlen($type) > 0) return $type;
|
if ($type !== false && strlen($type) > 0) return $type;
|
||||||
|
|
||||||
// Otherwise do it the old fashioned way
|
// Otherwise do it the old fashioned way
|
||||||
|
$ext = strtolower($ext);
|
||||||
static $exts = array(
|
static $exts = array(
|
||||||
'jpg' => 'image/jpeg', 'gif' => 'image/gif', 'png' => 'image/png',
|
'jpg' => 'image/jpeg', 'gif' => 'image/gif', 'png' => 'image/png',
|
||||||
'tif' => 'image/tiff', 'tiff' => 'image/tiff', 'ico' => 'image/x-icon',
|
'tif' => 'image/tiff', 'tiff' => 'image/tiff', 'ico' => 'image/x-icon',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user