This is my controller's code, that handles requests on following URL:
/app/invoices/download/id
for instance:
/app/invoices/download/10
to download bundle of invoices, which ID is equal to 10
def download():
url_parts = request.url.split('/')
bundle_id = url_parts[-1]
try:
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
Hello!
I want to stream a file as an attachment in the response. I have this
function:
def form_query():
response.flash = str(request.args(0))
response.generic_patterns = ['load']
response.headers['Content-Type'] =
gluon.contenttype.contenttype('.txt')
Hi,
I have this code working on localhost:
*def download():
**import os
**response.stream(os.path.join(request.folder, 'uploads',
request.args(0)))*
But does not works on GAE
Any hint?
--
Bruno Rocha
[http://rochacbruno.com.br]
I am using response.stream to download zip files, chunk size 4096. The
files appear to download fine but refuse to unzip. The response.header
content type is set for zip files. Is there a bug?
Peter
Hi,
Last night I did an upgrade of web2py from 1.65.x to 1.74.5. Now, this
piece of code:
return response.stream(open(path,'rb'),chuck_size=4096)
...does not work. It was working fine before the upgrade. I've looked
at the changes between versions but I don't see what could have caused
this.
6 matches
Mail list logo