I have products that are in different colours and sizes. So I have to make many pages for the same product but with the same product image. But when I add it from my computer it doubles the file and gives it a different name. For example my original file name was B1.jpg and when I add another page with the same file then the name will be B1[1].jpg and so on. This is very space consuming. It does the same thing when I add it from files folder. I understand that the program wont overwrite the files if they have the same name but in my case there is limited space for PHP program on my webserver and it would be excellent if I wouldn't have the same file 10 times. Can this be changed somehow?
and exchange it for following: $this->mData[$i]['sFileName'] = $sFile;
then put // in front of another line below (or just delete it): copy( DIR_FILES.$sFile, DIR_FILES.$this->mData[$i]['sFileName'] );
Every time you add a file from server, the same file is used (nothing new is actually created/added). Now this should work, untested. Let us know. Warning, I have a feeling there could be side-effects! :-)
marikas
2009-02-05 10:49
There must be smth else to be changed because this didn't work :S
marikas
2009-02-05 10:52
Oh but I uploaded from my computer, silly me :D:D When I just choose from the server then it works! Thanks :)