29 May
2001
29 May
'01
4:25 a.m.
I want to download generated data to a file on the users computer when they press a button. The button will call a python script which will generate the data. I'm not sure how to get the browser to bring up a download dialog and not just display the data. I am trying this. data = 'This is the data that is generated.' context.REQUEST.RESPONSE.setHeader('Content-Type', 'application/data') context.REQUEST.RESPONSE.setHeader('Content-Length', len(printed)) context.REQUEST.RESPONSE.setHeader('Content-Disposition', 'inline;filename=Data.dat') return data This display the data in the browser, but doesn't download it. Can someone help??? Thanks, Bruce.