[Catalyst] output binarydata(image)
Bill Moseley
moseley at hank.org
Fri Nov 27 16:19:15 GMT 2009
On Fri, Nov 27, 2009 at 7:45 AM, Malloy <jackworker at gmail.com> wrote:
> Hi All
>
> In the past, i use mason to handle my confirm code like this:
> ( my $data=3D $image->ImageToBlob(...);)
> $r->content_type('image/jpeg');
> $m->clear_buffer;
> print $data;
> $m->flush_buffer;
> $m->abort;
> But I want to know how to handle it using catalyst.
>
Same way.
my $res =3D $c->response;
$res->content_type( $type );
$res->body( $data );
Plus set your cache, length, and expires headers. I also test
if-modified-since headers.
-- =
Bill Moseley
moseley at hank.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20091127/154c4=
c7f/attachment.htm
More information about the Catalyst
mailing list