Re: csv report download -> Safari adding .html to filename?
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