diff options
author | Florian Pritz <bluewind@xinu.at> | 2015-03-02 12:14:58 +0100 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2015-03-02 12:14:58 +0100 |
commit | e9e9e635b337dc46111cdf95ccb16b7d28deb849 (patch) | |
tree | c69c6e12c48f71306cf54640b24b8c133f793090 /application/models | |
parent | ea8471781ee26f79c3835e68b31353601e78d0a8 (diff) |
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 <bluewind@xinu.at>
Diffstat (limited to 'application/models')
-rw-r--r-- | application/models/mfile.php | 10 |
1 files changed, 1 insertions, 9 deletions
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( |