<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><BR><DIV><DIV>Op 8-mei-2007, om 8:27 heeft Dries Buytaert het volgende geschreven:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">On 07 May 2007, at 21:13, Darrel O'Pry wrote:</DIV> <BLOCKQUOTE type="cite"><BLOCKQUOTE type="cite"></BLOCKQUOTE></BLOCKQUOTE><BLOCKQUOTE type="cite"><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">What if I want the files to get deleted when the node is deleted?</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Would they still be deleted with the proposed patch?</DIV> </BLOCKQUOTE><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">No. The file remains, but is disassociated from the node. There is no</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">way to guarantee the file is not in use elsewhere on your site, or</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">linked from an external site, so the file remains.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">It can be modified to do so, but being able to do it sanely will require</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">the addition on drewish's modules column, or a hook delete for reference</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">counting to make sure files are not in use elsewhere.</DIV> </BLOCKQUOTE><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">While I like the direction of your patch (I'm in favor), I think this might warrant a bit more thought and discussion.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">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.<SPAN class="Apple-converted-space"> </SPAN>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.<SPAN class="Apple-converted-space"> </SPAN>(Unless maybe you use a contrib module).</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">How do you all feel about this?<SPAN class="Apple-converted-space"> </SPAN>Does this drawback (if considered a drawback) outweight the advantages of this patch?</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">--</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Dries Buytaert<SPAN class="Apple-converted-space"> </SPAN>::<SPAN class="Apple-converted-space"> </SPAN><A href="http://www.buytaert.net">http://www.buytaert.net</A>/</DIV> </BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV>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..</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>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.</DIV><DIV>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. </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I'll definatly check/test/review doprys patch out later today.. </DIV>For anyone else who would like to see file handling improved, check the following patch:<BR><DIV><FONT class="Apple-style-span" face="Helvetica" size="3"><SPAN class="Apple-style-span" style="font-size: 12px;"><A href="http://drupal.org/node/115267">http://drupal.org/node/115267</A> - "Simplify File Uploads, Centralize File Validation and Quotas, Fix File Previews...."</SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" face="Helvetica" size="3"><SPAN class="Apple-style-span" style="font-size: 12px;"><BR class="khtml-block-placeholder"></SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" face="Helvetica" size="3"><SPAN class="Apple-style-span" style="font-size: 12px;"><BR class="khtml-block-placeholder"></SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" face="Helvetica" size="3"><SPAN class="Apple-style-span" style="font-size: 12px;">Steef</SPAN></FONT></DIV></BODY></HTML>