[web2py] response.stream changes filename of a file, that is being downloaded

2014-07-15 Thread Kuba Kozłowicz
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:

[web2py] response.stream

2012-10-18 Thread weheh
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

[web2py] response.stream and web2py_component

2012-09-06 Thread maverick
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')

[web2py] response.stream on GAE

2011-11-14 Thread Bruno Rocha
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]

[web2py] Response.stream problem with zip files

2011-09-15 Thread Deidre
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

[web2py] response.stream problem

2010-01-12 Thread LB22
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.