Use FILEINFO_MIME instead to get mime type

FILEINFO_MIME_TYPE is only available on PHP 5.3+ and on some servers
it'll use finfo_open but then get nothing back using this newer param
option.
This commit is contained in:
Matt Pass
2013-10-13 13:22:44 +01:00
parent f6e508fbff
commit 77b7a88651

View File

@@ -27,7 +27,7 @@ if ($_GET['action']=="load") {
$finfo = "";
// Determine what to do based on mime type
if (function_exists('finfo_open')) {
$finfoMIME = finfo_open(FILEINFO_MIME_TYPE);
$finfoMIME = finfo_open(FILEINFO_MIME);
$finfo = finfo_file($finfoMIME, $file);
finfo_close($finfoMIME);
} else {