From e9e9e635b337dc46111cdf95ccb16b7d28deb849 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Mon, 2 Mar 2015 12:14:58 +0100 Subject: Add imagemagick support Adds additional support for imagemagick if GD doesn't support a file type and extends the files displayed as thumbnails to all images and pdf files. Signed-off-by: Florian Pritz --- application/helpers/filebin_helper.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'application/helpers') diff --git a/application/helpers/filebin_helper.php b/application/helpers/filebin_helper.php index a1b540b1d..2604cfe4e 100644 --- a/application/helpers/filebin_helper.php +++ b/application/helpers/filebin_helper.php @@ -300,4 +300,12 @@ function cache_function($key, $ttl, $function) return $content; } +// Return mimetype of file +function mimetype($file) { + $fileinfo = new finfo(FILEINFO_MIME_TYPE); + $mimetype = $fileinfo->file($file); + + return $mimetype; +} + # vim: set noet: -- cgit v1.2.3-24-g4f1b