I can give you a snippet for downloading a file that was previously stored 
in a database.

    @expose(content_type='text/plain')
    def download(self):
        response.headerlist.append(('Content-Disposition', 
'attachment;filename=%s' % self.submission.filename))
        return self.submission.source

(The Content-Disposition part will let the browser display the Save 
As-Dialog insted if displaying the file.)

Am Montag, 16. April 2012 07:46:34 UTC+2 schrieb ritesh:
>
> Hi all, 
> My scenario of work is to download a file name "devdata.db" from tg 
> based application, which resides in top directory of project. How can 
> i achieve it?/ Please help me out. 
> Thanks in advance. 
>
>
> Regards 
> Ritesh

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/turbogears/-/k3NEPIq0sN4J.
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.

Reply via email to