allright!... I succeeded in displaying blob images to a cake-php page,
thanks to francky06l for explaining his method and to [EMAIL PROTECTED] and Dr.
Tarique Sani for their conversation, here's what I did:
the layout:
<?php echo $content_for_layout; ?>
the view:
<?php
header("Content-type: $type");
echo base64_decode($data);
?>
the model:
<?php
class View extends AppModel {
var $name = 'View';
var $useTable = 'items';
}
?>
the controller:
<?php
class ViewController extends AppController {
var $name = 'View';
var $layout = 'view_layout';
function index() {
}
function display($id) {
$item = $this->View->findById($id);
$this->set('data', $item['View']['photo']);
$this->set('type', $item['View']['photo_type']);
$this->render();
}
}
?>
the use:
type in whatever page something in this format:
<img src="/view/view/$itemid'" width="$width" height="$height">
and that's it!, cake-flavored blob image viewing =)
christianandradet no te awites k.. a la gente ke te resonda asi ni te
detengas a mirarla, bake on!
Mariano Iglesias, thanx for the support ;)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---