Is there a Pylons equivalent of CherryPy's serve_file ?
I'm trying to allow file download for files that are not in the
'public' directory

In cherry py, it'd go something like this:
from cherrypy.lib.static import serve_file
class Root:
    @cherrypy.expose
    def download(self, name):
        return serve_file(os.path.join(download_dir, name),
content_type='text/plain')

Many thanks.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to