On Feb 5, 2010, at 1:44 PM, John DeRosa wrote: > I'm building a site that will include using lots of image files, audio clips, > and video clips. Including users uploading these things and then later > referencing them. > > I don't want to store this binary data in the database, but instead want to > store them in disk files. > > I've looked for a Django app that manages flat files, and can't find one. By > "manage," I mean functions like organizing the directory into a year/mo/date > (for example) structure, returning filenames for new data to be recorded into > a database table, and returning the binary data given a link. This stuff > isn't rocket science, but I'd rather not code it from scratch. > > Anybody know of an suitable application for this? >
FileFields and ImageFields are by default stored on disk, with just a pointer stored in the db. For more examples, take a look at David Larlet's django-storages (http://code.welldev.org/django-storages/wiki/Home) and Justin Driscoll's ImageKit (http://bitbucket.org/jdriscoll/django-imagekit/wiki/Home), both of which should give you at least a starting point. With ImageKit, for example, you create a "spec" for your image fields, and part of the spec is a means of determining the filesystem storage location (including a method you can define if you need to). ---Peter Herndon -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.