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: > ---- > 'ascii' codec can't decode byte 0x89 in position 0: ordinal not in > range(128) > ---- > > How can i display it if i use 'content-type: image/jpeg' header? >
Forget to say, it works in non-IE browsers like this: ---- <img src="data:image/jpeg;base64,**** output of entry['jpegPhoto'][0].encode('base64') here ****" /> ---- -- 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/ ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ Python-LDAP-dev mailing list Python-LDAP-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/python-ldap-dev