I tried to achieve something similar with below link - have a look. Although I did not change the downloads() default function. It worked for me.. http://groups.google.com/group/flutuberwachung/browse_thread/thread/32b9daae6cc14840/e03404cf2d6e35b5#e03404cf2d6e35b5
Cheers Rahul On Dec 23, 9:28 pm, DenesL <denes1...@yahoo.ca> wrote: > Look at the code samples > underhttp://web2py.com/books/default/chapter/29/10#CSV > > On Dec 22, 10:09 pm, thstart <thst...@gmail.com> wrote: > > > > > > > > > I want the visitors to be able to download a CSV file. > > > here is my code: > > def download(): > > response.headers['Content-Type'] = 'text/csv' > > attachment = 'attachment;filename=' + file+ '.csv' > > response.headers['Content-Disposition'] = attachment > > > content = '....,....,....' > > raise HTTP(200,str(content), > > **{'Content-Type':'text/csv', > > 'Content-Disposition':attachment + ';'}) > > > When I click on the link download, I get 'Undefined' in the browser > > and nothing is downloaded. > > > What is wrong?