<DIV>I did the following.</DIV>  <DIV>&nbsp;</DIV>  <DIV>Firstly I initialized the gifs. I could do this because my gifs are fixed, I don´t need dynamic files:</DIV>  <DIV>&nbsp;</DIV>  <DIV>SomeClass&gt;&gt;intializeGifs<BR>&nbsp;|gifs imagekey newGif|<BR>&nbsp;gifs:= (FileDirectory on: 'C:\SES\product\squeak 3.8\working\img') fileNamesMatching: '*.gif'.<BR>&nbsp;gifs do: [:gif |<BR>&nbsp;&nbsp;imagekey:= ('DES-',(gif copyUpTo: $.)) asSymbol.<BR>&nbsp;&nbsp;newGif:= (FileStream readOnlyFileNamed: 'C:\SES\product\squeak 3.8\working\img\' , gif) reset; binary; contents.</DIV>  <DIV>&nbsp;&nbsp;ScriptingSystem formDictionary at: imagekey put: (newGif)].<BR>&nbsp;&nbsp;&nbsp;</DIV>  <DIV>where 'C:\SES\product\squeak 3.8\working\img' is a path in the server context.</DIV>  <DIV>&nbsp;</DIV>  <DIV>Then to use them:</DIV>  <DIV>&nbsp;</DIV>  <DIV>MyWAHtmlRenderer&gt;&gt;getImage: anImageName withPath: aPath<BR>&nbsp;|imagekey newForm|<BR>&nbsp;imagekey:= ('DES-',(anImageName
 copyUpTo: $.)) asSymbol.<BR>&nbsp;(ScriptingSystem formAtKey: imagekey) isNil<BR>&nbsp;&nbsp;ifTrue: [newForm:= (FileStream readOnlyFileNamed: ((FileDirectory default pathName),'\', aPath,'\',anImageName)) reset; binary; contents.<BR>&nbsp;&nbsp;&nbsp;&nbsp;ScriptingSystem formDictionary at: imagekey put: (newForm).<BR>&nbsp;&nbsp;&nbsp;&nbsp;].<BR>&nbsp;<BR>&nbsp;^self imageWithForm: (ScriptingSystem formAtKey: imagekey).</DIV>  <DIV><BR>&nbsp;</DIV>  <DIV>and also override...</DIV>  <DIV>&nbsp;</DIV>  <div>MyWAHtmlRenderer&gt;&gt;imageWithForm: aForm<BR>&nbsp;self image: (self context urlForDocument: aForm)</div>  <div>&nbsp;</div>  <div>and defined:</div>  <div>&nbsp;</div>  <div>ByteArray&gt;&gt;asMIMEDocument&nbsp;<BR>&nbsp;^MIMEDocument contentType: 'image/gif' content: self </div>  <DIV><BR>Felipe<BR><BR><B><I>Jens Pall &lt;jens@axonspace.com&gt;</I></B> escribió:</DIV>  <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px
 solid">Bany, Michel wrote:<BR>&gt; <BR>&gt;&gt; Regarding the files, I am looking for a way to serve binary <BR>&gt;&gt; data from directly within the image itself, not using files <BR>&gt;&gt; on the external filesystem. I'm planning on using Magma as <BR>&gt;&gt; the persistent repository for everything and don't want to <BR>&gt;&gt; rely on stuff out on the filesystem, hence I need a way to <BR>&gt;&gt; load and serve my images completely from within squeak.<BR>&gt; <BR>&gt; You may want something like this<BR>&gt; <BR>&gt; (html anchor)<BR>&gt; document: aByteArray <BR>&gt; mimeType: 'application/msword' <BR>&gt; fileName: 'report.doc'<BR>&gt; <BR><BR>Yes, this looks promising.<BR><BR>But how do I load the document from disk into aByteArray? I think I can <BR>do this using a web form, but I want to be able to load it directly from <BR>the filesystem (used in a batch load later).<BR><BR>JP<BR>_______________________________________________<BR>Seaside mailing
 list<BR>Seaside@lists.squeakfoundation.org<BR>http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside<BR></BLOCKQUOTE><BR>