summaryrefslogtreecommitdiffstats
path: root/application/models/file_mod.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/models/file_mod.php')
-rw-r--r--application/models/file_mod.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/application/models/file_mod.php b/application/models/file_mod.php
index b6194a39e..ffd031ace 100644
--- a/application/models/file_mod.php
+++ b/application/models/file_mod.php
@@ -88,10 +88,11 @@ class File_mod extends CI_Model {
$userid = $this->muser->get_userid();
$mimetype = exec("perl ".FCPATH.'scripts/mimetype '.escapeshellarg($filename).' '.escapeshellarg($this->file($hash)));
+ $filesize = filesize($this->file($hash));
$query = $this->db->query('
- INSERT INTO `files` (`hash`, `id`, `filename`, `user`, `date`, `mimetype`)
- VALUES (?, ?, ?, ?, ?, ?)',
- array($hash, $id, $filename, $userid, time(), $mimetype));
+ INSERT INTO `files` (`hash`, `id`, `filename`, `user`, `date`, `mimetype`, `filesize`)
+ VALUES (?, ?, ?, ?, ?, ?, ?)',
+ array($hash, $id, $filename, $userid, time(), $mimetype, $filesize));
}
function show_url($id, $mode)