On 07 May 2007, at 21:13, Darrel O'Pry wrote:
What if I want the files to get deleted when the node is deleted?
Would they still be deleted with the proposed patch?
No. The file remains, but is disassociated from the node. There is no
way to guarantee the file is not in use elsewhere on your site, or
linked from an external site, so the file remains.
It can be modified to do so, but being able to do it sanely will require
the addition on drewish's modules column, or a hook delete for reference
counting to make sure files are not in use elsewhere.
While I like the direction of your patch (I'm in favor), I think this might warrant a bit more thought and discussion.
The current model is that when you delete a node, the files associated with that node are also deleted -- both from the database and from disk. With this proposed patch, the files would remain on disk, and you'd have no way to delete them -- nor from the database, nor from disk. (Unless maybe you use a contrib module).
How do you all feel about this? Does this drawback (if considered a drawback) outweight the advantages of this patch?
--
IMO this is the behaviour people are looking for. If you did upload a file/image/whatever, it should be usable in every post/item you write, selectable with some sort of easy-to-use filebrowser..