[Catalyst] output binarydata(image)
Bogdan Lucaciu
bogdan at sinapticode.ro
Fri Nov 27 16:15:52 GMT 2009
On Fri, Nov 27, 2009 at 5:45 PM, Malloy <jackworker at gmail.com> wrote:
> In the past, i use mason to handle my confirm code like this:
>
> ( my $data= $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.
$c->response->body($data);
from perldoc Catalyst::Response
$res->body( $text | $fh | $iohandle_object )
I would recommend isolating this behaviour in a View .
--
Bogdan Lucaciu
Operations Manager, Sinapticode
http://www.sinapticode.com
More information about the Catalyst
mailing list