Re: view blob image

2007-05-01 Thread francky06l

I display images without problems, I have used something like this (do
not know if it's the best solution) :

In controller:

  $file_content = $this-Document-
read(array('image'), $k['Document']['id']);
  $encoded =
chunk_split(base64_encode($file_content['Document']['image']));
  $mime = $k['Document']['mime'];
  .
in the view:

  echo 'img src=data:{$mine};base64,'.$encoded.' 
style=border: 2px solid #005A73; padding: 5px;/
imgbr';

Note that the border is not necessary..

Hope this helps.

On Apr 30, 12:29 pm, rtconner [EMAIL PROTECTED] wrote:
 Well I dont know spanish, but are you using a layout that looks just
 like this?

 ?php echo $content_for_layout; ?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: view blob image

2007-04-30 Thread John David Anderson (_psychic_)


On Apr 30, 2007, at 8:36 AM, christianandradet wrote:


 hi,
 I am trying to view an image that is store in the database with a blob
 data type, this is the code i am trying
 ?php header(Content-type: image/jpg); ?
 ?php echo $funcionario['Funcionario']['fun_foto']?

 When i display this, the binary data is displayed

Where is this code? In the controller or the layout?

-- John

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: view blob image

2007-04-30 Thread christianandradet

in the layout, in the view.ctp file,


On 30 abr, 10:01, John David Anderson (_psychic_)
[EMAIL PROTECTED] wrote:
 On Apr 30, 2007, at 8:36 AM, christianandradet wrote:



  hi,
  I am trying to view an image that is store in the database with a blob
  data type, this is the code i am trying
  ?php header(Content-type: image/jpg); ?
  ?php echo $funcionario['Funcionario']['fun_foto']?

  When i display this, the binary data is displayed

 Where is this code? In the controller or the layout?

 -- John


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: view blob image

2007-04-30 Thread Dr. Tarique Sani

On 4/30/07, christianandradet [EMAIL PROTECTED] wrote:

 in the layout, in the view.ctp file,


Use a tool like httpliveheaders under firefox to see what are the
exact headers that your browser is recieveing

HTH

T

-- 
=
PHP for E-Biz: http://sanisoft.com
Cheesecake-Photoblog needs you!: http://cheesecake-photoblog.org
=

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: view blob image

2007-04-30 Thread christianandradet

hi,
thanks for your help,
i tried with firefox, and i get this error message:
La imagen http:///cake/appja/funcionarios/view/45; no puede
mostrarse, porque contiene errores.
the image http:///cake/appja/funcionarios/view/45; can't be
shown, because it has errors.

I don't know what to do please help. i already installed
httpliveheaders.

On 30 abr, 10:17, Dr. Tarique Sani [EMAIL PROTECTED] wrote:
 On 4/30/07, christianandradet [EMAIL PROTECTED] wrote:



  in the layout, in the view.ctp file,

 Use a tool like httpliveheaders under firefox to see what are the
 exact headers that your browser is recieveing

 HTH

 T

 --
 =
 PHP for E-Biz:http://sanisoft.com
 Cheesecake-Photoblog needs you!:http://cheesecake-photoblog.org
 =


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: view blob image

2007-04-30 Thread Dr. Tarique Sani

On 4/30/07, christianandradet [EMAIL PROTECTED] wrote:
 i tried with firefox, and i get this error message:
 La imagen http:///cake/appja/funcionarios/view/45; no puede
 mostrarse, porque contiene errores.
 the image http:///cake/appja/funcionarios/view/45; can't be
 shown, because it has errors.


U someone who understands the language will hopefully reply

T

-- 
=
PHP for E-Biz: http://sanisoft.com
Cheesecake-Photoblog needs you!: http://cheesecake-photoblog.org
=

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



RE: view blob image

2007-04-30 Thread Mariano Iglesias

He translated it.

Resides you ought to be learning spanish by now if you want to keep talking
to me :)

Need more hands on the Spanish google group, AD7six is just not enough.

-MI

---

Remember, smart coders answer ten questions for every question they ask. 
So be smart, be cool, and share your knowledge. 

BAKE ON!

blog: http://www.MarianoIglesias.com.ar


-Mensaje original-
De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
de Dr. Tarique Sani
Enviado el: Lunes, 30 de Abril de 2007 12:49 p.m.
Para: cake-php@googlegroups.com
Asunto: Re: view blob image

U someone who understands the language will hopefully reply


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: view blob image

2007-04-30 Thread Dr. Tarique Sani

On 4/30/07, Mariano Iglesias [EMAIL PROTECTED] wrote:
 Resides you ought to be learning spanish by now if you want to keep talking
 to me :)


Not fair - I am yet to learn Hindi properly. Besides am too old to
learn new tricks :)

Tarique

-- 
=
PHP for E-Biz: http://sanisoft.com
Cheesecake-Photoblog needs you!: http://cheesecake-photoblog.org
=

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: view blob image

2007-04-30 Thread christianandradet

Gracias Mariano mejor pregunto en el foro de espaƱol que es mas
chevere

On 30 abr, 10:51, Mariano Iglesias [EMAIL PROTECTED]
wrote:
 He translated it.

 Resides you ought to be learning spanish by now if you want to keep talking
 to me :)

 Need more hands on the Spanish google group, AD7six is just not enough.

 -MI

 ---

 Remember, smart coders answer ten questions for every question they ask.
 So be smart, be cool, and share your knowledge.

 BAKE ON!

 blog:http://www.MarianoIglesias.com.ar

 -Mensaje original-
 De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
 de Dr. Tarique Sani
 Enviado el: Lunes, 30 de Abril de 2007 12:49 p.m.
 Para: cake-php@googlegroups.com
 Asunto: Re: view blob image

 U someone who understands the language will hopefully reply


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: view blob image

2007-04-30 Thread rtconner

Well I dont know spanish, but are you using a layout that looks just
like this?

?php echo $content_for_layout; ?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---