[Catalyst] Force file download

Kevin Old kevinold at gmail.com
Fri Jul 29 17:54:58 CEST 2005


Hello everyone,

I'm generating a spreadsheet for a page in a site I'm developing in
Catalyst, and I'd like to force the user to download the file.  This
is working quite well, when I make the content_type:

$c->res->headers->content_type('application/octet-stream');

I'd also like to force a filename too, but this doesn't seem to work:
$c->res->headers->header('Content-Disposition: attachment;
filename=search.xls');

Any ideas what I might be able to do to get this working?

Thanks,
Kevin
-- 
Kevin Old
kevinold at gmail.com



More information about the Catalyst mailing list