Is there anywhere in Wordpress that you can delete the Gravity Forms uploaded files? Or can this only be done via FTP?
Thanks!
Is there anywhere in Wordpress that you can delete the Gravity Forms uploaded files? Or can this only be done via FTP?
Thanks!
When you delete an entry it should delete the uploaded files associated with that entry. Otherwise you would have to FTP and browse to wp-content/uploads/gravity_forms and delete the files you want to remove. However, Entry data may still point to those files if you just delete the file itself.
Carl,
Unfortunately when I delete the entry is leaves the file and does not delete it. I was hoping my client could have resumes uploaded on their site and they could get them via email, and manage everything through the wordpress dashboard.
Thanks,
Adam D
Carl, deleting the entry does not delete the associated file uploads. Is there a resolution to this? My clients can not FTP and try to find files - that would be a mess! Please advise...
Currently deleting the entry does not delete the files associated with that entry.
We will be adding this most likely in the 1.6 release. We've been holding back on doing so until we implement Trash functionality for Entries. Because once you delete them, they are gone. So we don't want to implement something like this until we have Trash functionality for situations where you delete an entry by accident.
If you want to delete the files, you can edit the entry and then click the Update button and delete the individual files.
Came looking for exactly this, I too am wanting resume (aka. CV's) submission via. Gravity Forms...spotted that deleting entries doesn't delete associated files.
Oh well, at least I know it's coming in v1.6!
PS. @Carl, is there an ETA on v1.6?
We have upgraded to 1.6, but it does not look like this has been implemented -- can you please provide an update? This is a big deal, as we now have files sitting on the FTP without any associated entries, so they may stay there forever!
Gravity Forms should be deleting entry related uploads when you delete an entry now.
It was a change made in Gravity Forms v1.6. It should occur both when you delete a file by editing an individual entry, and when you delete an entry permanently via the Trash.
I just verified this is indeed working as intended on my local test install. I have documented this via screenshots below.
Here is my entry detail showing the 2 files I uploaded:
http://dl.dropbox.com/u/185347/Slingshot/Pictures/Screen%20Shot%202011-11-28%20at%204.02.44%20PM.png
Here are the files on my development server:
http://dl.dropbox.com/u/185347/Slingshot/Pictures/Screen%20Shot%202011-11-28%20at%204.03.34%20PM.png
Here is my entry detail after deleting 1 file:
http://dl.dropbox.com/u/185347/Slingshot/Pictures/Screen%20Shot%202011-11-28%20at%204.03.53%20PM.png
Here are the files on my development server after deleting 1 file:
http://dl.dropbox.com/u/185347/Slingshot/Pictures/Screen%20Shot%202011-11-28%20at%204.04.15%20PM.png
Here are the files on my development server after moving the Entry to the Trash and then deleting it permanently from the Trash:
http://dl.dropbox.com/u/185347/Slingshot/Pictures/Screen%20Shot%202011-11-28%20at%204.04.56%20PM.png
Please note when you move an Entry to the Trash it does not delete the files associated with the Entry. It only deletes the files when you go to the Trash and delete the entry permanently. This is to prevent accidental deletion of files that you didn't intend to actually delete.
If this is not functioning properly then something isn't correct. The first thing I would check is make sure you have file permissions set so that the permissions on the wp-content/uploads/gravity_forms folder and ALL of it's sub-folders are set so that Gravity Forms which executes as PHP can delete existing files. It could be a file permission issue.
Thank you for the thorough testing.
However, I cannot get it to work on our system. I will have our developer spend some time debugging it, but one obvious difference I see is that the directory names for our uploads are not just showing the ID of the form -- they appear to have a hash tag inserted into them.
For example, if I make a new form, give it a file upload field, and upload a file to it, it's directory on the server is "9-18049550151d08054d552dd9bf6e2eda", instead of simply "9".
No manner of the deleting uploads (edit the forming entry, deleting the form/emptying the trash) work.
I am not sure permissions are the problem, as the normal WordPress media gallery works just fine with our existing permissions -- we can add/remove properly. Unless you're bypassing that system...?
FYI -- we are on a WordPress MultiSite install.
What version of Gravity Forms are you running? If you see "9" instead of "9-XXXXX" then it doesn't sound like you are running Gravity Forms v1.6+ OR it sounds like you are viewing entries created prior to Gravity Forms v1.6.
The name of the directory for uploads was changed in v1.6+ to incorporate a unique value as part of the directory name to make the folder name unique so it cannot be guessed.
Create a new form, with new upload fields and let me know what the folder name is. Also make sure you are running Gravity Forms v1.6.1+ and not an older version of Gravity Forms. The delete functionality was only introduced in Gravity Forms v1.6+.
We are running 1.6.1 in a MultiSite environment -- our new folders contain the hash.
I noticed in your screenshots that your folder did not, hence why I brought it up.
So our developer believes that Gravity forms is not doing a proper check for MultiSite installations (which normal WP does) before trying to delete the files (the locations are different).
He will be hard coding a fix in the plugin for our purposes, but please let us know if you'd be interested in the code, or in releasing a separate fix.
Our fix is in and files are being removed correctly on our MultiSite install; let us know if you'd like more details and/or if you plan to fix it in the core plugin.
Thanks,
Yes, any details you can provide will be most helpful so we can compare code and see exactly what is going on in this scenario. You can use http://pastie.org/ to show us the code if that works easiest for you. We are getting ready to release Gravity Forms v1.6.2 so if you can give us more details we should be able to work this fix into the next release.
Is there anyway to set up uploaded files to "auto - delete" after a specific period of time or when a certain size limit is reached.
I dont want files "piling up" and dont really want to go in and delete them by hand.
Thanks
@AndyDods +1000 for a feature like that.
My client's site is on a server with limited disk space and he is receiving 50+ emails with heavy attachments each week. The server disk gets full quickly. Now I or the client need to delete entries or files manually... An automated setting could be a real timesaver!
Thanks!
Thanks for letting us know. All my best!