AW: [Seaside] Images in a CSS style library

David Röthlisberger davidroe at bluewin.ch
Wed Apr 20 23:04:13 CEST 2005


Hello Pavel,


> processHttpRequest: aRequest
> 
>     (aRequest url endsWithAnyOf: #( '.gif' '.jpg' '.htm' 
> '.html' '.css'))
>         ifTrue: [
>             | img |
>             img := StaticDocumentsRepository at: aRequest url 
> allButFirst
> ifAbsent: [ ^ nil ] .
>             ^ HttpResponse fromStream: img readStream 
> contentType:  ''  ].
> 
>         ^ self process: aRequest


Thanks.
It does not yet work for me, though. The HttpResponse is answered correctly,
but in the browser the images are not displayed.
How have you stored your images? I have stored png-images as a byte array in
the image. Then the HttpResponse answers this byte array as a read stream,
so this should be okay, i guess?
But when I write 'html imageWithDocument: myImg mimeType: 'image/png'
fileName: nil' in a component, then the image is displayed, so I think it
should be stored correctly. 


David




More information about the Seaside mailing list