iain duncan <[EMAIL PROTECTED]> writes: > I'm curious for opinions from those more experienced about what the best > way to handle image uploads in an SA backed light-weight cms would be. > > Do you store the actual image in the db? Or just the file name?
This is a polemic topic for DBAs. Some of them prefer storing images on the filesystem. Other prefer storing them inside the database. It all depends on how critical your data is, IMNSHO. If you can't loose images put them inside the database and use an efficient database manager. If you can afford loosing them, you can use the filesystem and just put references to images there. Take special care analyzing what the database manager is and how efficient it is to handle a relatively big ammount of data. I have clients that only put images outside the database because of MySQL performance problems with big tables. > Do you make the admin interface upload the file with a mangled name a la > Django ( which I thought had pros and cons, but mostly confused my > clients )? How do you store the file and and handle uploading? I keep the names. I also have a UNIQUE constraint for the column that stores the name, so if the client tries uploading two "report.pdf" it will get an error for the second attempt and a message saying that he must provide a unique filename for each file. -- Jorge Godoy <[EMAIL PROTECTED]> --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---

