News - Delete field definition file on server
Posted: Thu Dec 09, 2010 9:45 am
Hello everyone!
I am currently running the news module with an additional Field Definition for a file upload on a site. The customer is uploading 2-3 files that way almost every week. The same 2-3 News do get "recycled" every week, meaning the client opens an existing News, changes the start and end date and replaces the file with the newer version (I realized this with the news module because I absolutely need start-end date for publishing these files, as they have a life-cycle).
As for now, the old file doesn't get deleted on the server, even if I hit the little checkbox "Delete" behind the file upload prompt, it just gets unlinked from the news but stays on the server (under uploads/news/id-of-the-news/). Uploading a new file without deleting the old one is the same, the new file gets linked to the news, the old one stays on the server. And since there are lots of files being changed every week I worry a bit about storage on the server.
Is there a simple way to automatically delete the file on the server, lets say in changing the behavior of the "Delete" Checkbox?
Thanks for your help,
Fab
I am currently running the news module with an additional Field Definition for a file upload on a site. The customer is uploading 2-3 files that way almost every week. The same 2-3 News do get "recycled" every week, meaning the client opens an existing News, changes the start and end date and replaces the file with the newer version (I realized this with the news module because I absolutely need start-end date for publishing these files, as they have a life-cycle).
As for now, the old file doesn't get deleted on the server, even if I hit the little checkbox "Delete" behind the file upload prompt, it just gets unlinked from the news but stays on the server (under uploads/news/id-of-the-news/). Uploading a new file without deleting the old one is the same, the new file gets linked to the news, the old one stays on the server. And since there are lots of files being changed every week I worry a bit about storage on the server.
Is there a simple way to automatically delete the file on the server, lets say in changing the behavior of the "Delete" Checkbox?
Thanks for your help,
Fab