Ahoi,
I have been getting kicked out of cake whenever I display a blob image
in cake.
Here is my function:
function display($id) {
if (!$id) {
$this->Session->setFlash(__('Invalid Image.', true));
$this->redirect(array('action'=>'index'));
}
Configure::write('debug', 0);
$file = $this->Image->findById($id);
header("Content-type: ".$file['Image']['type']);
echo $file['Image']['image'];
}
I have also put a before filter in my images controller:
function beforeFilter() {
parent::beforeFilter();
$this->Auth->allowedActions = array('display');
}
Its not a major problem for this app but it is anoying, any ideas?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---