[development] Allow existing files to be attached

andrew morton drewish at katherinehouse.com
Thu Dec 6 16:44:12 UTC 2007

On Dec 6, 2007 8:11 AM, Philippe Jadin <philippe.jadin at gmail.com> wrote:
> On Dec 6, 2007 2:46 PM, Darrel O'Pry <dopry at thing.net> wrote:
> > Not it is not possible to safely share files tracked by Drupal in D5 and
> > below. There are changes in D6 that make this possible, but no interface
> > has been written for it yet.
> Could you explain what is not safe or give some pointers?

If multiple modules are sharing a file there's no way for them to know
that another is using it. So when a node with a file is attached is
deleted, any other modules' nodes that are using that file will be
left with a database record but no file.

I'm not sure what changes dopry is referring to, as far as I know D6
has the same problem. Unresolved issues on how to handle deletion were
what held up the patch to add a hook_file:


More information about the development mailing list