$this->filesize = filesize($f);
+ if($this->mimetype == 'application/pdf'){
+ $this->no_of_pages = $this->getPdfPages($f);
+ }
+
$this->update($o);
return true;
$pdfinfo = System::which('pdfinfo');
- if (empty($pdfinfo)) {
+ if (!file_exists($file) || empty($pdfinfo)) {
return $page;
}