From: Ryan L. <ry...@st...> - 2009-06-09 18:42:11
|
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 |