mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-06 08:44:02 +01:00
Consider extensions up to a space char
This enables ICEcoder to understand that image.jpg (2) is a jpeg and can be opened as an image
This commit is contained in:
@@ -30,7 +30,7 @@ if ($_GET['action']=="load") {
|
||||
$finfo = finfo_file($finfoMIME, $file);
|
||||
finfo_close($finfoMIME);
|
||||
} else {
|
||||
$fileExt = pathinfo($file, PATHINFO_EXTENSION);
|
||||
$fileExt = explode(" ",pathinfo($file, PATHINFO_EXTENSION))[0];
|
||||
if (array_search($fileExt,array("coffee","css","htm","html","js","less","md","php","py","rb","ruby","txt","xml"))!==false) {$finfo = "text";};
|
||||
if (array_search($fileExt,array("gif","jpg","jpeg","png"))!==false) {$finfo = "image";};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user