I have a method that I'd like to return an xml-file as RESPONSE. The name of the method is manage_saveAction. I've tried to do this: content = myDocument.toxml() RESPONSE.setHeader('Content-Type', 'text/xml') RESPONSE.setHeader('Title', "file1.xml") return content This works well, the content of the returned file is good, but the name of the response is "manage_saveaction", not "file1.xml". So I guess there is a problem with the third line, but I can't find it. Does anyone know what has to be done? TIA, Jesper -- Jesper Holmberg |"But how can | jesper.holmberg@enst-bretagne.fr | one be warm | ENST Br, BP 832, 29285 Brest, FRANCE | alone?" |
On Mon, Dec 10, 2001 at 07:05:12PM +0100, Jesper Holmberg wrote:
RESPONSE.setHeader('Title', "file1.xml")
This works well, the content of the returned file is good, but the name of the response is "manage_saveaction", not "file1.xml". So I guess there is a problem with the third line, but I can't find it. Does anyone know what has to be done?
Content-Disposition instead of Title: RESPONSE.setHeader('Content-Disposition', "inline; filename=file1.xml") Oleg. -- Oleg Broytmann http://www.zope.org/Members/phd/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
participants (2)
-
Jesper Holmberg -
Oleg Broytmann