Page 1 of 1
Uploading same name images
Posted: Mon Jun 22, 2009 10:22 pm
by readyman
Not a massive bug, but if you are trying to upload images of the same name, then all previous images of the same name are overwritten. Eg. if you upload images1/preview.jpg, images2/preview.jpg & images3/preview.jpg they get overwritten.
I think wordpress checks if the file exists when uploading, and if it does, it just adds a new number to the filename - maybe something to think about for the next update.
Re: Uploading same name images
Posted: Mon Jun 22, 2009 10:38 pm
by Daniel
just be carefull with uploading images. its might be good practise to add prefixes to the images before uploading.
Re: Uploading same name images
Posted: Sat Jul 04, 2009 1:55 am
by leovicio
in
admin\controller\catalog image.php
Replace
Code: Select all
$filename = basename($this->request->files['image']['name']);
Code: Select all
$filename = md5(mktime());
$ext = explode('.',basename($this->request->files['image']['name']));
$filename.='.'.end($ext);
Re: Uploading same name images
Posted: Fri Sep 11, 2009 1:58 pm
by tarrasque
Hi, im new here, and just install opencart v1.3.2, and found the image.php has been removed form after v1.3.0...
so, any workaround to fix this in v1.3.2? please help...
Re: Uploading same name images
Posted: Fri Sep 11, 2009 7:55 pm
by Qphoria
well if its gone its possibly no longer an issue.
Re: Uploading same name images
Posted: Thu Oct 01, 2009 8:40 pm
by cactus
Hi,
the problem still exists. Now everything has been moved to the file "admin/controller/catalog/product.php". Does anyone know how to modify the code in OpenCart 1.3.2, the pictures were uploaded at the beginning, for example, the name of the product with id?