summaryrefslogtreecommitdiffstats
path: root/application/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'application/controllers')
-rw-r--r--application/controllers/file/file_default.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/application/controllers/file/file_default.php b/application/controllers/file/file_default.php
index f4f106990..9ef7d0880 100644
--- a/application/controllers/file/file_default.php
+++ b/application/controllers/file/file_default.php
@@ -971,11 +971,14 @@ class File_default extends MY_Controller {
foreach ($query as $key => $item) {
$data_id = $item["hash"].'-'.$item['id'];
- $mimetype = mimetype($this->mfile->file($data_id));
+ $filepath = $this->mfile->file($data_id);
+ $mimetype = mimetype($filepath);
+ $filesize = filesize($filepath);
$this->db->where('id', $item['id'])
->set(array(
'mimetype' => $mimetype,
+ 'filesize' => $filesize,
))
->update('file_storage');
}