// Unit changed for product pictures, I set it up to a usable minimum #PSCFV-6597

This commit is contained in:
Damien Metzger
2013-02-21 11:52:42 +01:00
parent 3460821e51
commit dc027cb3cf
3 changed files with 15 additions and 18 deletions
+1 -5
View File
@@ -270,11 +270,7 @@ class ImageManagerCore
public static function validateUpload($file, $max_file_size = 0)
{
if ((int)$max_file_size > 0 && $file['size'] > (int)$max_file_size)
return sprintf(
Tools::displayError('Image is too large (%1$d kB). Maximum allowed: %2$d kB'),
$file['size'] / 1000,
$max_file_size / 1000
);
return sprintf(Tools::displayError('Image is too large (%1$d kB). Maximum allowed: %2$d kB'), $file['size'] / 1024, $max_file_size / 1024);
if (!ImageManager::isRealImage($file['tmp_name'], $file['type']) || !ImageManager::isCorrectImageFileExt($file['name']))
return Tools::displayError('Image format not recognized, allowed formats are: .gif, .jpg, .png');
if ($file['error'])