Any example to display jpegPhoto?

Zhang Huangbin zhbmaillistonly at gmail.com
Sat Jun 6 01:52:12 CEST 2009


Michael Ströder wrote:
> Zhang Huangbin wrote:
>   
>> Is there ny example to display jpegPhoto stored in LDAP as base64 format?
>>     
>
> Not sure what you really want to display and where.
>
> How about entry['jpegPhoto'][0].encode('base64') ?
>
> Or are you talking about LDIF? Then use module ldif which automagically
> base64-encodes NON-ASCII values.
>
>   

Thanks Michael :)

Just display the jpegPhoto on web page, not LDIF. :)

I got encoded string after 'entry['jpegPhoto'][0].encode('base64') ',
but how to convert it to a image file and use '<img> tag in HTML to
display it?



-- 
Best regards.

Zhang Huangbin

- Open Source Mail Server Solution for RHEL, CentOS,
  Debian, Ubuntu:
    + Homepage: http://code.google.com/p/iredmail/
    + Forum: http://www.iredmail.org/forum/





More information about the python-ldap mailing list