Re: Download File Question for IE
Re: Download File Question for IE
- Subject: Re: Download File Question for IE
- From: Zak Burke <email@hidden>
- Date: Mon, 03 Apr 2006 10:54:14 -0400
James Cicenia wrote on 4/3/06 10:07 AM:
I am thinking it has to do with how I am setting mimetypes, etc.???
Other sites seem to work properly.
Here is my simple piece of code:
response.setHeader("application/vnd.ms-excel", "Content-Type");
response.setHeader(theDocumentItem.projectDocumentObject().documentObject().length()+"",
"Content-Length");
response.setHeader("filename=\""+theDocumentItem.title()+"\"","Content-Disposition");
response.setContent(theDocumentItem.projectDocumentObject().documentObject());
Well, you can force the file to come through as an attachment, prompting
a "do you want to save or open this file?" dialog box, rather than as
part of the normal content stream. To do that, update your
Content-Disposition header like this:
response.setHeader("attachment;filename=...", "Content-Disposition");
Beware of some buggy behavior with HTTPS/IE6, however. Kieran has the
details here:
http://homepage.mac.com/kelleherk/iblog/C1216817469/E102943740/index.html
zak.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden