Any example to display jpegPhoto?
Ryan Lovett
ryan at stat.berkeley.edu
Tue Jun 9 20:26:25 CEST 2009
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:
> ----
> <img src="data:image/jpeg;base64,**** output of
> entry['jpegPhoto'][0].encode('base64') here ****" />
> ----
You would have a tag such as <img src="jpegphoto.cgi?user=someone"> 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.
Ryan
More information about the python-ldap
mailing list