[Catalyst-dev] trouble with a pdf attachment

Jillian Rowe jir2004 at qatar-med.cornell.edu
Wed Nov 7 05:20:25 GMT 2012


Thanks! I tried out the File::Slurp just now, and it works perfectly!

Altogether its:

use File::Slurp;
my $fileholder = read_file( $file );
$c->res->content_type('application/pdf');
$c->res->header('Content-Disposition', "attachment; filename=$name");
$c->res->body( $fileholder );

Best,
Jillian


More information about the Catalyst-dev mailing list