Jean-Denis Girard wrote:
...
> This is working fine for me on tg2.0:
>
> ~ @expose()
> ~ @allow_only(predicates.not_anonymous())
> ~ def serve_file(self, date=None, file=None):
> ~ import paste.fileapp
> ~ f =
> paste.fileapp.FileApp('/usr/share/games/xmoto/Textures/Musics/speeditup.ogg',
> ~ **{'Content-Disposition': 'attachment; filename=' +
> 'test.ogg'})
> ~ from tg import use_wsgi_app
> ~ return use_wsgi_app(f)
That seems to work fine for me. There's a note here:
http://trac.turbogears.org/ticket/2385
that seems to suggest that use_wsgi_app has been removed for TurboGears
2.1 (i.e. it is deprecated). The replacement (WSGIAppController)
doesn't seem to be appropriate, though I suppose I could try hooking
into object dispatch to return a different controller for each file in
the directory.
Thanks for the pointer,
Mike
--
________________________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://www.vrplumber.com
http://blog.vrplumber.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?hl=en
-~----------~----~----~----~------~----~------~--~---