From caefac39600033ec2a68d9d823e67bf60329ee03 Mon Sep 17 00:00:00 2001 From: Peter Rotich <peter@osticket.com> Date: Sat, 28 Jul 2012 23:54:47 -0400 Subject: [PATCH] Use human readable file size --- include/class.osticket.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/class.osticket.php b/include/class.osticket.php index e6f34740e..033ec0f82 100644 --- a/include/class.osticket.php +++ b/include/class.osticket.php @@ -138,8 +138,8 @@ class osTicket { if(!$this->isFileTypeAllowed($file)) $file['error']='Invalid file type for '.$file['name']; elseif($file['size']>$this->getConfig()->getMaxFileSize()) - $file['error']=sprintf('File (%s) is too big. Maximum of %s bytes allowed', - $file['name'], $this->getConfig()->getMaxFileSize()); + $file['error']=sprintf('File (%s) is too big. Maximum of %s allowed', + $file['name'], Format::file_size($this->getConfig()->getMaxFileSize())); elseif(!$file['error'] && !is_uploaded_file($file['tmp_name'])) $file['error']='Invalid or bad upload POST'; -- GitLab