[Seaside] Displaying an image from a ByteArray

Yar Hwee Boon hboon at motionobj.com
Sun Dec 12 12:09:16 CET 2004


On Sun, 12 Dec 2004 12:06:30 +0100, Avi Bryant <avi.bryant at gmail.com>  
wrote:

> On Sun, 12 Dec 2004 12:50:37 +0800, Yar Hwee Boon <hboon at motionobj.com>  
> wrote:
>> I'm trying to display an image that has its contents store in a  
>> ByteArray.
>> I create a class HBPicture that has this #width and #height defined  
>> along
>> with
>>
>> HBPicture>>asMIMEDocument
>>         ^ MIMEDocument contentType: 'image/png' content: contents
>>
>> When I create an instance of HBPicture and pass it to
>> WAHtmlRenderer>>imageWithForm:, the image does not load and the loading
>> process (of the browser) does not stop, seems its waiting for a  
>> response,
>> anyone know what's wrong? Thanks.
>
> Try going directly with your browser to the URL for the image (in the
> src attribute of the generated img tag).  I bet you get a walkback
> that tells you more.

Nope, that gives the same behavior, ie. seemingly waiting for a response.  
I did step through the code and it *seemed* that it generated a response  
instance back to KOM, ie, writing the image bytes, MIME type, etc, but i'm  
not sure if I missed anything subtle.

-- 
Regards
HweeBoon
MotionObj


More information about the Seaside mailing list