X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=inventory%2Fmanage%2Fitems.php;h=e3d710ee054db4c40dae837b02b5082556f2cc9f;hb=b6ae2ddcd0cbc571edd01157ca1c8d44bbe071ef;hp=54df94bf68969db2202871c05bdb4734385f68a9;hpb=17b390efcf904072b02ec866b2a427490471a260;p=fa-stable.git diff --git a/inventory/manage/items.php b/inventory/manage/items.php index 54df94bf..e3d710ee 100644 --- a/inventory/manage/items.php +++ b/inventory/manage/items.php @@ -64,6 +64,15 @@ if (isset($_FILES['pic']) && $_FILES['pic']['name'] != '') mkdir($filename); } $filename .= "/".item_img_name($stock_id).".jpg"; + + if ($_FILES['pic']['error'] == UPLOAD_ERR_INI_SIZE) { + display_error(_('The file size is over the maximum allowed.')); + $upload_file ='No'; + } + elseif ($_FILES['pic']['error'] > 0) { + display_error(_('Error uploading file.')); + $upload_file ='No'; + } //But check for the worst if ((list($width, $height, $type, $attr) = getimagesize($_FILES['pic']['tmp_name'])) !== false)