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/models/mfile.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'application/models') diff --git a/application/models/mfile.php b/application/models/mfile.php index 51c865900..f0a594609 100644 --- a/application/models/mfile.php +++ b/application/models/mfile.php @@ -93,20 +93,12 @@ class Mfile extends CI_Model { return $this->folder($hash).'/'.$hash; } - // Return mimetype of file - function mimetype($file) { - $fileinfo = new finfo(FILEINFO_MIME_TYPE); - $mimetype = $fileinfo->file($file); - - return $mimetype; - } - // Add a hash to the DB function add_file($hash, $id, $filename) { $userid = $this->muser->get_userid(); - $mimetype = $this->mimetype($this->file($hash)); + $mimetype = mimetype($this->file($hash)); $filesize = filesize($this->file($hash)); $this->db->insert("files", array( -- cgit v1.2.3-24-g4f1b