"Sanjay" <[EMAIL PROTECTED]> writes:

> My project needs storing and retrieving document, pdf, images etc. from the
> database. Thanks to the article
> http://trac.turbogears.org/turbogears/wiki/StoringAndRetrievingFilesFromDatabase,
> which was really useful for a novice like me to comfortably store, and then
> display images.

Thanks. ;-)  I've written that in a hurry so that it doesn't get lost
somewhere else. 

> This works nicely for showing images directly in the browser. However,
> I need that if the document is either a PDF or some other type, the
> download pop-up should come, and user should be able to download it.
> Tried manipulating the decorator, but couldn't succeed.

You can set the content-type programmatically.  What will happen on browser
side (either download windows or opening the file) is dependent on the
configuration on the other side.

There are some recipes on the mailing list to set this and other properties
with CherryPy.


-- 
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to