On 10/27/06, Sanjay <[EMAIL PROTECTED]> wrote: > > > My need was > > 1. I shall store all kind of documents and images in a database column. > 2. Whenever a corrsponding url is clicked, the user would get download > dialog box. > 3. If a url is referred in an <img>, the image would be displayed. > > I am using @turbogears.expose(content_type="application/xyz") > literally, and things are working as needed! >
That's really not going to be the best way to do it, you need to set the content type properly or things will break. Some people's browsers embed PDFs in the browser window and that won't work with this method. My advice would be to add a mime_type field to your db and to make sure that it's set correctly for the data inserted in the `content` database column. That way, browsers will behave correctly when downloading files. 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 -~----------~----~----~----~------~----~------~--~---

