Forums

Is there a way to get the uploads to auto delete after an hr

startgroup 06 Mar, 2009
Is there a way to get the uploads to auto delete after an hour? Since they are sending in sendmail, I dont need them anymore on the server and my server gets touchy. Any ideas?

Thank you.
GreyHead 07 Mar, 2009
Hi startgroup,

It's possible using a cron job set up from your server but (at present) Joomla doesn't have any built in timer.

You could though add code to your form to check for any files more than an hour old and delete them next time the form is used; or you could delete them in the same form in the OnSubmit After box (which runs after the email is sent) - though this runs the risk that you can't recvoer them if the email fails.

Bob

PS Unusual to have a server with storage capacity problems these days?
This topic is locked and no more replies can be posted.