Fred Pacquier wrote:

> What I'm trying to do is a simplified download manager of sorts -
> based on the WebKit Admin pages examples. Think of a list of files
> (on the server) with checkboxes (like the page where you reload
> modules in Admin), protected by a SecurePage login. I'd like the
> user to be able to tick off a few files, press the "download" button,
> and have the corresponding "Save as..." dialog(s) open in her
> browser.
>
> By guesswork from the examples I've got the presentation part
> visually working as expected (quite a tribute to Webkit in itself, that :-
> ), but I don't know how to actually push the files for download. From
> a Zope cookbook recipe I gather there must be some black magic
> involved along the lines of :
>
> self._response.setHeader(...)
>
> ... but the actual syntax escapes me :)

Content-Disposition: attachment;filename=foo.bar

see rfc 2183

http://www.faqs.org/rfcs/rfc2183.html

This still depends on the user agent, but is the best (only) way I know of.


_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to