Is it possible to do a response.stream in the middle of an ajax callback?
I want to give users a button, which if pressed, will tar up all their
files and initiate a download. Something like this:
TAG.BUTTON(..., _onclick="ajax("%s", [], ':eval');" % URL(c='mycontroller',
f='mydownload'))
Then later, in mycontroller.py,
def mydownload():
... create tarfile ...
return response.stream(tarfile, attachment=True)
I tried it, but (perhaps obviously to some) it doesn't work. So, how to get
the mydownload() action to cause the browser to download the tarfile?
--