[development] files owned by uid, patch review request.
Stefan Nagtegaal
development at robuustdesign.nl
Tue May 8 07:50:08 UTC 2007
Op 8-mei-2007, om 8:27 heeft Dries Buytaert het volgende geschreven:
>
> 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?
>
> --
> Dries Buytaert :: http://www.buytaert.net/
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..
I'm not sure how (yet?), but I think it would be possible and _very_
usable to determine which files are attached to which posts, and the
other way around.
If we find a mechanism to accomplish something like this, chances are
smaller that files are being removed/deleted which are still in use,
or that orphan files are eating your diskpace.
I'll definatly check/test/review doprys patch out later today..
For anyone else who would like to see file handling improved, check
the following patch:
http://drupal.org/node/115267 - "Simplify File Uploads, Centralize
File Validation and Quotas, Fix File Previews...."
Steef
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20070508/b14ac7cc/attachment-0001.htm
More information about the development
mailing list