Re: Any example to display jpegPhoto?

2009-06-09 Thread Zhang Huangbin
Ryan Lovett wrote: > You would have a tag such as where > jpegphoto.cgi is a CGI script that outputs "Content-type: image/jpeg" > followed by the JPEG data. > > But that is an HTTP topic so you should probably consult a Python/CGI > resource. Solved, thanks all :) I use webpy framework, solved j

Re: Any example to display jpegPhoto?

2009-06-09 Thread Michael Ströder
Zhang Huangbin wrote: > Zhang Huangbin wrote: >>> Not sure what you really want to display and where. >>> >>> How about entry['jpegPhoto'][0].encode('base64') ? > > Still confused what data type it stored in LDAP. > Already base64 encoded? Please read my e-mails more carefully. As said in <4a2a4

Re: Any example to display jpegPhoto?

2009-06-09 Thread Ryan Lovett
On Tue, Jun 09, 2009 at 05:14:33PM +0800, Zhang Huangbin wrote: > > How can i display it if i use 'content-type: image/jpeg' header? > > Forget to say, it works in non-IE browsers like this: > > > You would have a tag such as where jpegphoto.cgi is a CGI script that outputs "Content-t

Re: Any example to display jpegPhoto?

2009-06-09 Thread Zhang Huangbin
Zhang Huangbin wrote: > Zhang Huangbin wrote: >>> Not sure what you really want to display and where. >>> >>> How about entry['jpegPhoto'][0].encode('base64') ? > > Still confused what data type it stored in LDAP. > Already base64 encoded? > > Display entry['jpegPhoto'][0] directly, got error msg:

Re: Any example to display jpegPhoto?

2009-06-09 Thread Zhang Huangbin
Zhang Huangbin wrote: >> Not sure what you really want to display and where. >> >> How about entry['jpegPhoto'][0].encode('base64') ? Still confused what data type it stored in LDAP. Already base64 encoded? Display entry['jpegPhoto'][0] directly, got error msg: 'ascii' codec can't decode byt