diff --git a/application/controllers/admin/labels.php b/application/controllers/admin/labels.php index 5aa7901a084..e519becdbe6 100644 --- a/application/controllers/admin/labels.php +++ b/application/controllers/admin/labels.php @@ -136,6 +136,11 @@ public function import() $aPathInfo = pathinfo($_FILES['the_file']['name']); $sExtension = !empty($aPathInfo['extension']) ? $aPathInfo['extension'] : ''; + if ($_FILES['the_file']['error']==1 || $_FILES['the_file']['error']==2) + { + $this->getController()->error(sprintf(gT("Sorry, this file is too large. Only files up to %01.2f MB are allowed."), getMaximumFileUploadSize()/1024/1024)); + } + if (!@move_uploaded_file($_FILES['the_file']['tmp_name'], $sFullFilepath)) $this->getController()->error(sprintf(gT("An error occurred uploading your file. This may be caused by incorrect permissions in your %s folder."), Yii::app()->getConfig('tempdir')));