-1
es eine Möglichkeit, Upload mit bestimmten Breite zu zwingen und Höhe in PHP Upload, habe ich dieses Modulerforderliche Breite und Höhe Bild php Prestashop
if(Configuration::get('SHOW_IMAGES') == 1) {
$images = count($_FILES['images']['name']);
if ($images <= Configuration::get('MAX_IMAGES')) {
for ($i=1; $i<=Configuration::get('MAX_IMAGES'); $i++) {
if ($_FILES['images']['name'][$i] != "") {
if ((($_FILES['images']['type'][$i] == "image/pjpeg") ||
($_FILES['images']['type'][$i] == "image/jpeg") ||
($_FILES['images']['type'][$i] == "image/png")) &&
($_FILES['images']['size'][$i] < $this->return_bytes(ini_get('post_max_size')))) {
$url_images[$i] = $_FILES['images']['tmp_name'][$i];
}
else {
$this->errors[] = $this->module->l('The image format is incorrect or max size to upload is', 'addproduct').' '.ini_get('post_max_size');
}
}
else {
$this->errors[] = $this->module->l('The image is incorrect or max size to upload is', 'addproduct');
}
}
}
else {
$this->errors[] = $this->module->l('The maxim images to upload is', 'addproduct').' '.Configuration::get('MAX_IMAGES');
}
}