Forums

Delete uploaded files after sending them as attachments

hefesto 17 Jul, 2011
Hi there

I'm using V4 on Joomla 1.6.5 after a long time using older versions... and I love it!!! It's quite shocking in the beggining, as the user interface is completely different, but after a while working with it you can feel how powerful the new interface is.

I'm creating a form for a job application that has some attachment fields (for CV, degrees certificates, and so). I've managed to get those files uploaded, verified (size, extension), attached and sent with an email, but I'd like to be able to delete them once they're sent, as there's no need to keep them on the server once they've been sent to the responsible person. Is there an action available for doing that? If not, would it be possible to re-use this code to do it?

http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=2&t=14968&p=37266&hilit=delete+uploaded+files#p37266

Thanks in advance.
GreyHead 17 Jul, 2011
Hi hefesto,

There's no action to do it but this code should do the trick with a suitable path JFile::delete($uploadpath);

Bob
This topic is locked and no more replies can be posted.