In addition I would also suggest using cherrypy's serveFile[1]. [1]: http://www.cherrypy.org/chrome/common/2.2/docs/book/html/index.html#id3447347
Lee On 10/27/06, Patrick Lewis <[EMAIL PROTECTED]> wrote: > > The key is the content_type in the @expose decorator, which sets > cherrypy.response.headers["Content-Type"], and ultimately lets your > browser know what is coming down the tube. (For PDF's this type is > "application/pdf", http://www.iana.org/assignments/media-types/ for > others). So, you are going to need to come up with a strategy in your > app to identify what type of a document/file you are dealing with, and > then set cherrypy.response.headers["Content-Type"] appropriately. > > If you have a controller specific to displaying just PDFs, you should > be able to set the decorator as: > @turbogears.expose(content_type="application/pdf") > > > > > -- 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 -~----------~----~----~----~------~----~------~--~---

