From 816db0549676ae83c3d3505523118a71d30e9623 Mon Sep 17 00:00:00 2001 From: nathangray Date: Thu, 15 Feb 2018 10:16:04 -0700 Subject: [PATCH] Use abstraction to determine mime type, see 9a398594acfcf5e8b2c4b5a82c13d0b2aaf0a0aa --- api/src/Etemplate/Widget/File.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/Etemplate/Widget/File.php b/api/src/Etemplate/Widget/File.php index 9ec6cd7529..f28de45a44 100644 --- a/api/src/Etemplate/Widget/File.php +++ b/api/src/Etemplate/Widget/File.php @@ -150,9 +150,9 @@ class File extends Etemplate\Widget // Don't trust what the browser tells us for mime if(function_exists('mime_content_type')) { - $file['type'] = $type = mime_content_type($file['tmp_name']); + $file['type'] = $type = Api\MimeMagic::analyze_file($file['tmp_name']); } - + // Mime check if($mime) {