View Issue Details

IDProjectCategoryView StatusLast Update
0001775OXID eShop (all versions)2. ----- eShop backend (admin) -----public2010-05-14 16:05
Reporterwebtools Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionno change required 
Product Version4.3.0 revision 26948 
Summary0001775: Picture Upload
DescriptionWhen you upload a master-pic several times you get:

masterpic.jpg
masterpic(1).jpg
masterpic(2).jpg
masterpic(3).jpg
masterpic(4).jpg
masterpic(.....).jpg

I don`t understand why the old picture isn`t deleted an the new one used.

Deleting the picture doesn`t delete
masterpic(1).jpg
masterpic(2).jpg
masterpic(3).jpg
masterpic(4).jpg
masterpic(.....).jpg

So at the end you habe several pictures which will never be used.

In one case I had the Problem, that I couldn`t replace a picture by uploading a new one. Only deleting the old picture BEFORE uploading a new one worked.
TagsNo tags attached.
Theme
BrowserAll
PHP Versionany
Database Versionany

Activities

dainius.bigelis

2010-04-16 16:59

reporter   ~0002560

Such solution was implemented to avoid deleting the pictures with the same name, which belongs to different articles.
But this place can be improved by appending some ID to the file name of the picture (i.e. article number).
@Developers: please check how this case can be improved.

rimvydas_paskevicius

2010-05-14 16:05

reporter   ~0002867

Uploading article image with same name does not mean that this is same image. It can be that this is different images, only name is same, so additional suffix is added to file name if there already exist file with same name.

masterpic.jpg
masterpic(1).jpg
masterpic(2).jpg

When deleting article master image(e.g. oxpic1), before deleting it checks, if there is any article which has same oxpic1 value. If yes, this means they are using same image file, and file can not be deleted.

Usually when you adding picture using admin interface, every article will have unique picture file name and when you deleting picture, only this file will be deleted. But in same cases user can make own article import script, where few articles has same picture file name. In this case deleting one article picture must prevent from file deletion (as other article uses it) until there will be only one article with this picture name.