Jump to content

[RESOLU] format de l'image non reconnu


Recommended Posts

bonjour,

 

j'ai un probleme avec prestashop

je suis sur la derniere version

 

a l'ajout d'une image produit il me dis img_9766c.jpg : format de l'image non reconnu ; formats acceptés : GIF, JPG, PNG

 

je ne comprend pas pourquoi l'image est bien dans un format accepté 

cela fait la meme chose avec du png

 

comment je peut resoudre ce probleme?

 

merci a tous

 

 

Edited by corsinu (see edit history)
Link to comment
Share on other sites

re bonjour,

 

j'ai pu reglé le probleme tout seul en bidouillant

 

si sa peut aider d'autre personne voici une solution qui fonctionne pour ma part

commenté la ligne return Tool::displayError

	public static function validateUpload($file, $max_file_size = 0, $types = null)
	{
		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'] / 1024, $max_file_size / 1024);
		if (!ImageManager::isRealImage($file['tmp_name'], $file['type']) || !ImageManager::isCorrectImageFileExt($file['name'], $types) || preg_match('/\%00/', $file['name']))
			//return Tools::displayError('Image format not recognized, allowed formats are: .gif, .jpg, .png');
		if ($file['error'])
			return sprintf(Tools::displayError('Error while uploading image; please change your server\'s settings. (Error code: %s)'), $file['error']);
		return false;
	}
Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...