• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Download File Question for IE
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Re: Download File Question for IE (From: Wolfram Stebel <email@hidden>)
 >Re: Download File Question for IE (From: James Cicenia <email@hidden>)

  • Prev by Date: Re: Download File Question for IE
  • Next by Date: Re: URGENT issues with CLOSE_WAIT states
  • Previous by thread: Re: Download File Question for IE
  • Next by thread: Basic Question Wo and JSP [OT]
  • Index(es):
    • Date
    • Thread