Delete!
Posted: 13 Mar 2009, 08:10
Why doesn´t Phoca delete the actual files? It only deletes db entrys and NOT the actual files. This means that your webspace will fill up VERY fast.
I just have to ask some questions because i am curious. I´m not a Joomla developer so i don´t know about the inner workings of coding for Joomla. But i am an experienced PHP developer. So i can relate to the points you pointed out. But still have some questions. Maybe you can explain them to me (if you have the time) so i can understand more about Joomla.Jan wrote:Hi, the not deleting original images has a lot of reasons there.
E.g.:
- original images can be uploaded by other methods (ftp, media manager, etc). So Phoca Gallery cannot delete images which were not uploaded by the Phoca Gallery
- original image can be used for e.g. 5 entries in database (because there are two layers - database and file layer), so if you will delete it then it can be missed for other entries (e.g. for using it while downloading, recreating thumnails, rotating, etc.)
- if you work with images (image names in database), it can be very quickly and it is not time and performance consuming... if this will work with physical files on the server too, then the server can have problems with not enough memory and cpu. I have tested the function which will check the files (if they are not used anymore) but the searching physical files was so slow and took a lot of memory so such function was not implemented...
I think there are more possible problems (I don't remember them all) but they are surely described in this forum, so if you are interested, try to search this forum...
BTW: This works only for backend and not for frontend. In frontend original files will be deleted if user deletes the image (there is other system for accessing the files and some functions which are working in backend are not working here)
Jan