• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Solution to remove uploaded files after emailing.

Solution to remove uploaded files after emailing. 11 years 7 months ago #24728

Hi there,

I am using RSForms! to manage a simple form that allows a client to upload files and have them emailed to an administrator.

I don't want the files to be kept on the server after the email is sent as it will fill up the client's limited webhosting space. I noticed that a few other forum posts have expressed a similar need but I haven't found a solution on any of them.

In case it helps out anyone else, this is how I solved.

Create a cron job in cPanel (or other webhost) with the following command:

/home/USERNAME/public_html/components/com_rsform/uploads -type f -mmin +5 ! -name index.html -exec rm {} \;

Set this to run to what ever schedule suits you. It will find all files in the uploads folder that are over 5 minutes old and delete them. The 5 minute age-buffer is to avoid the file being deleted while RSForms is still trying to operate on it, and there is a file exclusion for the index.html file that is in the uploads folder. This file is important to prevent people from browsing the contents of the folder I believe. The folder path is correct for my installation of RSForms! but you may need to modify it slightly.

Let me know if this helps anyone.
The administrator has disabled public write access.

Solution to remove uploaded files after emailing. 11 years 7 months ago #24737

Hello Mike,

This would not be advised, if the administrator does not receive the email properly, then the attachment would be lost. You could try advising your administrators to simply access the admin panel of your Joomla! installation after the attachment email was confirmed and delete the file manually from the "Manage submissions" tab.
Please remember that my responses aren't considered customer support, to receive customer support please submit a new customer support ticket, and we will gladly assist you.

Best Regards,
Cristian Nicolae.
The administrator has disabled public write access.

Solution to remove uploaded files after emailing. 10 months 2 weeks ago #43527

  • martijn5
  • martijn5's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
I'm sorry for bumping this after such a long time but this is the only meaningfull post I find if I search via Google "rsforms File Uploads attachments delete". Does the above mean that uploaded files get deleted automatically as well, when submissions are deleted? Or only when "Delete Submissions Older Than xx Days:" is given to the form?

Or are the files never getting deleted unless you do it manually?

Thank you!
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!