Hello all ,

 I am new to cakephp.  I am using cake 1.3 .
 i want to upload image by encoding it in base64.

 here is my image code in  view  
      form is enctype multipart encoded 

      <?php echo $this->Form->file('photo', array('id' => 
'fileField','label'=>false)); ?>

 here is my base64 encode in  controller
      
     
      $photo = base64_encode($this->data['Card']['photo']);
      echo $photo;

i am using this code on another view
    <img src="data:image/jpg;base64,<?php echo base64_decode($photo);?>"   
width="25" height="24" />

It is not getting encoded in base64.

Thanks in advance.


-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to