[Catalyst] internal redirect

Adeola Awoyemi adeola at digitalcraftsmen.net
Wed Apr 11 15:28:59 GMT 2007


Hi all,

Is there a way to do an internal redirect in Catalyst?

In my application I'm generating images on the fly and want to  
redirect to the image if creation succeeds.

For instance:

     $image = Imager->new()
     $image->read( file => $src_file );
     $new_img = $image->copy->scale( xpixels => 32, ypixels => 32 );
     if ( $new_img->write( file => $new_filename ) ) {
         # do internal redirect to new file here
     }

I tried using "$c->response->redirect( $new_filepath )" but that  
issues a 302 "Temporarily Moved" status. But what I actually want is  
a way to do the redirect outside of the response chain.

I hope this is clear?!

Thanks,

Adeola.


--
Creative Developer - Digital Craftsmen Ltd
Exmouth House, 3 Pine Street
London, EC1R 0JH
t: +44 20 7183 1410
f: +44 20 7099 5140
m: +44 79 3952 0786
w: http://www.digitalcraftsmen.net/







More information about the Catalyst mailing list