Deleting files from documents directory (Technics)

by mkjjj, Sunday, July 01, 2012, 11:21 (4316 days ago)

I've just stumbled upon a little problem with attached files. After editing a thread and deleting the attached file the file is physically still in the documents directory. This might or might not be intended. Is there, however, an option for deleting the file automatically, when the link was deleted? If not, forum admins would have to do this manually via FTP. Not a big deal, but not too convenient.
Thank you very much in advance for your help.

Avatar

Deleting files from documents directory

by Auge ⌂, Sunday, July 01, 2012, 15:14 (4316 days ago) @ mkjjj

Hello

I've just stumbled upon a little problem with attached files. After editing a thread and deleting the attached file the file is physically still in the documents directory.

I hope, I understood the problem. You want to delete a posting, but the attached images/uploads will not deleted from the file system.

This might or might not be intended. Is there, however, an option for deleting the file automatically, when the link was deleted?

There is a good reason not to implement it in the described way. An uploaded image/file may be used in some postings/threads by someone else than the uploader. So it is easier to delete it with a FTP client than to search the whole database table for postings with a program routine or to implement a new table to administer the uploaded files and their use (wich would be IMHO the proper way).

Tschö, Auge

--
Trenne niemals Müll, denn er hat nur eine Silbe!

Deleting files from documents directory

by mkjjj, Sunday, July 01, 2012, 15:40 (4316 days ago) @ Auge

Hi,

thank you for your reply. That's exactly what I meant and I get your point. FTP might be easy for you and me. But believe me, that's not true for a lot of people out there. :-D
Thanks again for taking your time.

Mike

RSS Feed of thread