Yes Daffy you have the ticket. It seems you cant set a variable off
the array like i tried to do:
this is bad:
$type = $file['ImageUpload']['type'];
header('Content-type: ' . $type);
this is good:
$type = $file['ImageUpload']['type'];
here is a follow-up post:
http://groups.google.com/group/cake-php/browse_thread/thread/d9fe1b765325667e?hl=en#
On Mar 18, 5:36 am, Daffy <[email protected]> wrote:
> Our ways are similar. What is the base64_decode for?
>
> This is how I do it.
>
> Controller:
>
> function display($id) {
> Configure::write('debug', 0);
> $file = $this->ImageUpload->findById($id);
> echo $file['ImageUpload']['thumb'];
> header('Content-type: ' . $file['ImageUpload']['type']);
> exit();
>
> }
>
> View:
>
> <img src="/image_uploads/display/<?php echo $ImageUpload['ImageUpload']
> ['id']; ?>">
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---