serving files are all about http headers.

On Jul 22, 11:40 am, Marius Gedminas <[email protected]> wrote:
> On Wed, Jul 21, 2010 at 12:40:23PM -0700, Mike Orr wrote:
> > On Wed, Jul 21, 2010 at 12:33 PM, Ian Wilson <[email protected]> 
> > wrote:
> > > Hello,
>
> > > I think you want something like this.
>
> > > from paste.fileapp import FileApp
>
> > > #.... in controller ....
> > >         #...in some action, get the path to serve
> > >         wsgi_app = FileApp(path)
> > >         return wsgi_app(request.environ, self.start_response)
>
> > Yes, use paste.fileapp.  You can just return the wsgi_app object
> > directly, and Pylons will call it for you.
>
> Don't you also need to wrap it in pylons.controllers.util.forward?
>
> http://pylonshq.com/docs/en/0.9.7/modules/controllers_util/#pylons.co...
>
> (I haven't tried simply returning FileApp() myself, but I have memories
> of someone on IRC who tried and got scant success.)
>
> Marius Gedminas
> --
> The advertisement is the most truthful part of a newspaper.
>                 -- Thomas Jefferson
>
>  signature.asc
> < 1KViewDownload

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