• 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: csv report download -> Safari adding .html to filename?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: csv report download -> Safari adding .html to filename?


  • Subject: Re: csv report download -> Safari adding .html to filename?
  • From: Andrew Lindesay <email@hidden>
  • Date: Tue, 7 Apr 2009 09:57:44 +1200

I have just looked up where I do this and although it calls a number of other methods, if I distil it out to an example, I get this for Safari;

response.setHeader("text/csv; charset=UTF-8; encoding=UTF-8", "content-type");
response.setHeader("attachment; filename=\"FOOBAR.CSV\"", "content- disposition");


..and this for MSIE...

response.setHeader("application/vnd.ms-excel; charset=UTF-8; encoding=UTF-8", "content-type");
response.setHeader("attachment; filename=\"FOOBAR.CSV\"", "content- disposition");


This is in production and I have not had any complaints. ;-)

cheers.

No luck (for me) with that approach. And I presume you mean "text/ csv" not "test/csv"?
...

response.setHeader( "test/csv; name=\"" + reportFilename + "\"", "content-type" );

___ Andrew Lindesay www.lindesay.co.nz

_______________________________________________
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: 
 >csv report download -> Safari adding .html to filename? (From: Leif Harrison <email@hidden>)
 >Re: csv report download -> Safari adding .html to filename? (From: Mark Morris <email@hidden>)
 >Re: csv report download -> Safari adding .html to filename? (From: Leif Harrison <email@hidden>)

  • Prev by Date: Hudson and dependencies
  • Next by Date: Re: maven.
  • Previous by thread: Re: csv report download -> Safari adding .html to filename?
  • Next by thread: Re: csv report download -> Safari adding .html to filename?
  • Index(es):
    • Date
    • Thread