[development] files owned by uid, patch review request.
Larry Garfield
larry at garfieldtech.com
Tue May 8 15:05:31 UTC 2007
On Tue, 08 May 2007 09:40:05 -0400, Earnie Boyd <earnie at users.sourceforge.net> wrote:
> Quoting Darrel O'Pry <dopry at thing.net>:
>
>>> 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.
>>
>
> I haven't looked at the patch so forgive me if this is addressed.
> Would it be possible to make this a feature within the system settings?
> Would it be possible to have a count of nodes using the file and if
> the node being deleted is the only one prompt for the user for file
> deletion?
>
> Earnie
I would concur here. Leaving untracked orphan files around should not be typical behavior. Some sort of simple reference counting would need to be included so that (a) we can auto-delete files that are no longer in use (give or take a setting to do so or leave them) and/or (b) provide an admin area to manage said files.
If files become a first-class core data type (along with nodes, users, vocabularies, and comments), then they need some sort of direct management. It doesn't have to be complicated; something akin to admin/content/node is probably all that would be needed (with a "number of uses" column). But a first-class data type needs administrative control within core. Contribs can add alternate admin screens if desired, but core needs to have something.
That said, I'm strongly in favor of this move.
--Larry Garfield
More information about the development
mailing list