Closed (fixed)
Project:
ImageField
Version:
6.x-3.0-alpha3
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
2 Jan 2009 at 03:44 UTC
Updated:
2 Jan 2014 at 23:45 UTC
Jump to comment: Most recent
Comments
Comment #1
philsward commentedI too noticed the same thing tonight, playing with alpha3. I am working on a classifieds website where I will be at the mercy of many users uploading images and really don't want the overhead of cleaning up images...
Otherwise, keep up the great work!
Comment #2
philsward commentedI made a boo-boo in the 'Issue title' on my last post... I meant to add a +1 for the issue and added it to the title.
I am using this post to fix my mistake. (oops!!)
Comment #3
NecroHill commentedsubscribing
Comment #4
ephyr commentedSubscribing
Comment #5
wmnnd commentedI would propose to not remove them but moving them to a special folder e. g. called "deleted".
So, if you have deleted an image by error, you will be able to recover it, but you can also easily delete images which are no longer needed.
Comment #6
highvoltage commentedA trashbin type folder is a great idea actually.
Comment #7
basicmagic.net commentedsubscribe
Comment #8
frankcarey commentedsubscribe
Comment #9
philsward commentedI think an option for a trashbin is a great idea but I think the best overall solution is to have two options:
1) Delete for good
2) Delete to trashbin with a token configurable path to where the trashbin would be located.
On a site where there are many users, they wouldn't have access to the trashbin to recover images unless it is specified within the module to grant them that access. Then you have the problem of making a trashbin for every user and giving them the ability to either permanently delete a picture or keep it in "their" trashbin. Totally possible but that is a lot of work... The killfile module might provide useful in this situation...
I know that the proposed trashbin is probably a singular trashbin that only admin users would have access to but ya... just throwing out some ideas and associated problems.
I personally want to see a 'remove file from server when image is removed' type of option in the field configuration. On the sites I run with a lot of users, I don't want to give them their own trash bin. What an administration nightmare! lol
The whole purpose of deleting the pictures from the server is to reduce the file size footprint from the server keeping it clean and tidy and I don't think that the average user should be the final decision maker on whether or not the server is kept clean.
Just my two cents. I hope this feature is in the sights to get implemented soon!!
Comment #10
spjsche commentedsubscribing
Comment #11
account-deletion-needed commentedSubscribing
Comment #12
account-deletion-needed commentedHere's some code I quickly threw together which deletes any unused image files when cron is executed:
To make this work you have to implement it in your own module using hook_cron or you could patch it into imagefield. Alternatively you could also execute it through hook_nodeapi so the files get deleted as you insert/update/delete nodes (though you'd probably have to adjust your module weight for it to work simultaneously).
Comment #13
drewish commentedthis is a filefield issue, it needs to happen in there.
Comment #14
highvoltage commentedSo should the issue be moved, a new one made over at file field, or is this already planned and a new issue is unnecessary?
Comment #15
drewish commentedhighvoltage, i've closed several of these issues as duplicates at this point but people keep opening new ones so i'm not going to bother. go look in the file field queue.
Comment #16
philsward commentedversion 6.x-3.0-alpha7 of FileField will now remove a file from the server when it is removed from imagefield.
I have just tested this feature with alpha 7 and while it WILL remove a file when "removed" then "saved", it will not remove an original file if one is uploaded, removed then another one is uploaded and saved.
Basically, at this time an image will have to be removed then the node saved, then go back into the node and add the new picture. Otherwise the original stays on the server. I will be posting this as an issue on the FileField queue if it hasn't already been caught.
As posted in previous comments, I have no use for a "trash bin", so I won't be posting anything in the FileField queue about implementing some sort of trash / recycle bin. If someone else really has a need for this feature, I am guessing that a new feature request should be filed with the FileField queue.
Update: 2009-02-10
I had created an issue on the FileField issue queue: http://drupal.org/node/369450 regarding the module not removing files from the server if an image is added, then removed and another one is added before a "save" is initiated. The issue was promptly closed with the answer of "The files should clean themselves up on a cron run". After testing this, the files are NOT cleaning themselves up. If you are noticing similar issues, please post on the FileField issue posted above.
Comment #17
drewish commented