I have an image stored in MSQL.(Don't tell me its not proper do that,I know 
already).Anyways I need to display it in DTML.

 StockChartManagePreview (DTML)

 <dtml-var standard_html_header>
 <img src="StockChartManagePreview_Handler">
 <dtml-var standard_html_footer>

 StockChartManagePreview_Handler (python script)

 request = container.REQUEST
 response = request.RESPONSE
 photo = context.StockChartManage_getImage(ID = 6666)
 context.REQUEST.RESPONSE.setHeader('content-type','image/jpeg')
 return photo[0].image.read()
 #I already tried - return photo[0].image
 #it gives an error image cannot be displayed because it contains errors


 StockChartManage_getImage (Z SQL Method)

 SELECT image
 FROM `imagebase`
 WHERE imageID =<dtml-sqlvar ID type="string">


 Now my problem is that Zope asks for a login every time I view the DTML 
(StockChartManagePreview )

 Please Help.

 ref : https://mail.zope.org/pipermail/zope-db/2004-July/003336.html 
http://www.zope.org/Members/murphy/MySQL-BLOBs
 http://www.gossamer-threads.com/lists/zope/db/168437 
http://www.zope.org/Members/murphy/MySQL-BLOBs
_______________________________________________
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to