diff options
Diffstat (limited to 'application/models/mfile.php')
-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( |