[Twisted-web] Nevow-Stan How to save file?

Colin Alston karnaugh at karnaugh.za.net
Thu Mar 13 03:24:29 EDT 2008


On 13/03/2008 09:16 Suha Onay wrote:
> return [
>     T.a(href="/xxx/qqq.lqp")['Save'],
>     webform.renderForms()[FORM_LAYOUT],
> ]
> 
> I run this page from Firefox, IE and IE Mobile.
> I want the browser open a save as dialog but it shows the file within 
> the browser.
> How can I achieve this?

You need to set the MIME type for that extension. Not sure how to do 
this with the static file method, there is a mapping somewhere which 
you can pass as arguments to the instance if I remember correctly.



More information about the Twisted-web mailing list