[support] File Attachment Maintenace [Solved]

Chris McKeever cgmckeever at gmail.com
Wed Mar 14 19:57:55 UTC 2007


Think I figured it out once I understood things a bit more.

A file is attached to a revision of a node, not to the node
'delete' pretty much says 'remove this from the next revision'

so the file still exists in the db and the filesystem, so if you
revert revs, it will be there.

to 'delete' the file from drupal and the filesystem, you need to
remove any node revision that it is attached to ...

makes sense in the revisioning mindset - not very clear when you think
of file management -- but it could only be one or the other I suppose
-

Thanks


On 3/14/07, Chris McKeever <cgmckeever at gmail.com> wrote:
> a litle more info after some testing...
>
> The 'magic' connector between files and nodes is through the
> file_revisions table.
> So I can figure out why some files get listed and some do not.
>
> The next issue now is, why when I delete a file from the admin
> interface, the revision history gets deleted from the table, but the
> 'file' table entry does not get deleted, nor does the file within in
> filesystem ?
>
> I am running this as the admin account, the permissions of the
> filesystem allow the creation as the apache user, but it isnt
> deleting.
>
> Thanks
>
>
> On 3/14/07, Chris McKeever <cgmckeever at gmail.com> wrote:
> > I deleted a file from the node that it was uploaded to, however, it
> > still exists in the /files directory.
> >
> > Looking at the SQL schema, it appears that the file sitll has an entry
> > in the 'files' table, however it doesnt appear to be listed on the
> > node.
> >
> > I haven't found the magic trick which tells drupal that a file has
> > been removed from a node...
> >
> > So --
> >
> > A) are files supposed to be purged once they are deleted from the node?
> > B) how does the node know which file to list - is there a bit field somewhere?
> >
> > Thanks
> >
>


More information about the support mailing list