On 9/22/06, Krys <[EMAIL PROTECTED]> wrote: > > But neither answer answers the question of whether or not it is better > to store them as files on the hard drive... >
I think the point of the posts was that it depends on your situation, but here's ways you can do it if you want. Generally I don't like to put things like images and files into a database (especially in the same table as other data). The performance of sending a file from the filesystem is so much better than via cherrypy/php/whatever and your database backend. There are, however, exceptions to the rule. For example, an application I wrote in TurboGears for a client was a suppliment (and will eventually replace) an application that runs across many platforms. The way the data is accessed prevented it being stored on a filesystem as frontends, backends and storage were all on different platforms and, in one case, in different locations. In the above case the performance issues outweighed the complexity of serving the required files from a filesystem across a few networks, platforms and applications. Basically, have a think about it. If you're writing an app that's sitting on one machine or you have NFS available, storage on the filesystem is probably the best solution. If not, maybe storage in the DB is the best solution. Hope this helps, Lee -- Lee McFadden blog: http://www.splee.co.uk work: http://fireflisystems.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~----------~----~----~----~------~----~------~--~---

