summaryrefslogtreecommitdiffstats
path: root/application/models/mfile.php
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2015-03-02 12:14:58 +0100
committerFlorian Pritz <bluewind@xinu.at>2015-03-02 12:14:58 +0100
commite9e9e635b337dc46111cdf95ccb16b7d28deb849 (patch)
treec69c6e12c48f71306cf54640b24b8c133f793090 /application/models/mfile.php
parentea8471781ee26f79c3835e68b31353601e78d0a8 (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/mfile.php')
-rw-r--r--application/models/mfile.php10
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(