Thanks MCM this method still works nearly 3 years later!
A question though:
when the csv file is downloaded it has the name 'unknown' with no .csv. Do
you know how I can change that filename to something like 'data.csv' ?
thanks in advance,
Ben
On Friday, November 1, 2013 at 3:36:00 PM UTC-7, mcm
To avoid redirect and use ajax see this thread:
https://groups.google.com/d/msg/web2py/HQU5kD0tGag/LGtjlikzWdsJ
mind that there is a penalty due to base64 encoding, that implies that the
benefit depends on how large the data to be trasmitted is.
2013/11/1 Niphlod
> yep.
> check response.strea
yep.
check response.stream
http://web2py.com/books/default/chapter/29/04/the-core?search=response.stream
On Friday, November 1, 2013 8:24:11 PM UTC+1, San L wrote:
>
> We would like to allow use user to download a csv file when clicking a
> button on a page (not redirect or pop up a new window)
3 matches
Mail list logo