Closed (fixed)
Project:
FileField
Version:
6.x-3.3
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
8 Mar 2010 at 19:55 UTC
Updated:
30 Jun 2010 at 22:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
boabjohn commented+1 and thanks very much Adamo for pushing this along...and thanks quicksketch for following up with the code.
Now waiting for a fix that's better than the (much appreciated) hack at http://drupal.org/node/441280#30
Comment #2
quicksketchHere's the basic idea implemented in a patch. This introduces an implementation of hook_file_delete() for FileField, since it is necessary if a file were uploaded by FileField but then force-deleted by some other module (like IMCE). I haven't actually tested this in any capacity, just an idea of how we should go about this.
Comment #3
Stephen Scholtz commentedsubing
As per Adamo's original post, I have the same use case with IMCE as all purpose file/image-browser in conjunction with File Field + File Field Sources.
Comment #4
quicksketchThis problem was a bit more complicated than I thought, but the patch in #2 had the right idea. There were a few caveats where FileField shouldn't be calling node_save() multiple times when a node is saved and file has been removed. Likewise, FileField should not be attempting to delete a file multiple times if field_file_delete($file, TRUE) is called to force the deletion of a file.
I've committed this patch so that we can get it in as part of the 3.4 release.