[Seaside] serve jpg image files from form objects

Boris Popov boris at deepcovelabs.com
Wed May 31 20:38:18 UTC 2006

Here's what I did to serve PNG files from VisualWorks,

(html anchor)
 attributeAt: 'rel' put: 'lightbox';
 callback: [self session 
		returnResponse: (WADocumentHandler 
				document: self pngImageBytes
				mimeType: 'image/png'
				fileName: 'image.png') response];
		with: [(html image)
				style: 'border: none; padding: 0px;';
				url: (self pictures addToPath: 'view.png');
				altText: 'View']

Hope this helps,				


DeepCove Labs Ltd.
4th floor 595 Howe Street
Vancouver, Canada V6C 2T5

boris at deepcovelabs.com


This email is intended only for the persons named in the message
header. Unless otherwise indicated, it contains information that is
private and confidential. If you have received it in error, please
notify the sender and delete the entire message including any

Thank you.

-----Original Message-----
From: seaside-bounces at lists.squeakfoundation.org
[mailto:seaside-bounces at lists.squeakfoundation.org] On Behalf Of Martin
Sent: Wednesday, May 31, 2006 12:30 PM
To: seaside at lists.squeakfoundation.org
Subject: [Seaside] serve jpg image files from form objects

hello out there,
allthough i browsed throught the archives i couldn`t find the answer  
to my problem.

i want to serve a jpg-file which is stored in a Form object.
so i do : aForm _ (Form fromFileNamed: 'wave.jpg')

then i tried the following inside the #renderContentOn:  method :
html imageWithDocument: aForm bits asByteArray
		mimeType: 'image/jpeg'
		fileName: root name,'Picture', '.jpg'.

this doesn`t work, and when i am acceptin the following, seaside  
seems to convert the jpg file to gif or wracks up the picture file  
somehow :

	html imageWithDocument: aForm
		mimeType: 'image/jpeg'
		fileName: root name,'Picture', '.jpg'.

anybodys having some experience with this issue?
thanks for help!


Seaside mailing list
Seaside at lists.squeakfoundation.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3370 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/seaside/attachments/20060531/d54ce45c/smime.bin

More information about the Seaside mailing list