[Seaside] RE: Seaside Digest, Vol 50, Issue 46

Eugene Westerhof eugenewesterhof at hotmail.com
Sat Feb 17 08:20:04 UTC 2007

Hi ...
To make WaCachedDocument work for image-files in the seaside version that came with visualworks, I had to change SeasidePlatformSupport>>mimeDocumentOfType:from: as follows
mimeDocumentOfType: type from: aString  | mimeType aFilename | aFilename := aString asFilename. mimeType := type     ifNil: [Net.MimeTypeDescriptor mimeTypeForFile: aFilename]. mimeType isImageType   ifTrue:    [^self mimeDocumentClass contentType: mimeType    content: (ImageReader fromFile: aFilename) image       asGIFNonTransparent gifBytes]. ^self mimeDocumentClass contentType: mimeType  content: aFilename readStream upToEnd
where the method isImageType does the obvious. This did the trick for me. Maybe there are better solutions
Probeer Live.com: je eigen persoonlijke opstartpagina met alleen de dingen die jij belangrijk vindt op één plek.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20070217/71212280/attachment.htm

More information about the Seaside mailing list