It took me a while but I have opensourced a tool to clean the media folder from all the leftovers. It's a cron job with a simple admin gui. Also handles multiple upload folders.
We have been using something similar to this internally for more than a year, and we are pretty happy about it. https://github.com/PuzzleDev/django-uploadcleaner Just out of curiosity, how do you normally handle file removal? On Tuesday, March 29, 2011 3:43:13 PM UTC+2, Carl Meyer wrote: > > Hi Alex, > > On 03/29/2011 01:36 AM, Alex Kamedov wrote: > > I think, cron jobs is an overhead in many simple cases where old > > behaviour was useful and more simpler. > > Why you don't want include DeletingFileField[1] in django? > > > > [1] https://gist.github.com/889692 > > Because, as mentioned above, it is known to cause data loss in certain > situations (rolled-back transactions, overlapping upload-to > directories), and we are not very fond of including things in Django > that cause some Django users to lose their data. If you understand those > risks and want to use DeletingFileField in your projects, it's not hard > to do so. > > Carl > > -- You received this message because you are subscribed to the Google Groups "Django developers" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-developers/-/wpPZcb_BKr0J. To post to this group, send email to django-developers@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.