<div dir="ltr"><div>I quickly put this together:<br></div><div>It will serve stuff placed in the assets directory (which must sit next to the image). Nothing really fancy but does the job:<br></div><div><br>ZnSeasideStaticServerAdaptorDelegate subclass: #CCStaticServerDelegate<br>
instanceVariableNames: ''<br> classVariableNames: ''<br> category: 'Cocotte-Web'<br><br>CCStaticServerDelegate>>handleRequest: znRequest<br> znRequest url firstPathSegment = 'assets'<br>
ifTrue: [ <br> znRequest url removeFirstPathSegment. "eats the /assets/"<br> ^self staticDelegate handleRequest: znRequest ]<br> ifFalse: [ ^self adaptor process: znRequest ]<br>
<br>CCStaticServerDelegate>>initializeStaticDelegate<br> | assetDirectory |<br> assetDirectory := (FileLocator imageDirectory / 'assets'). <br> ^ ZnStaticFileServerDelegate new<br> directory: (ZnFileSystemUtils directory: assetDirectory) ;<br>
yourself<br><br></div>And the Adaptor:<br><br>ZnZincStaticServerAdaptor subclass: #CCZincStaticServerAdaptor<br> instanceVariableNames: ''<br> classVariableNames: ''<br> category: 'Cocotte-Web'<br>
<br>ZnZincStaticServerAdaptor>>defaultDelegate<br> ^ CCStaticServerDelegate with: self<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Apr 13, 2014 at 3:16 PM, Johan Brichau <span dir="ltr"><<a href="mailto:johan@inceptive.be" target="_blank">johan@inceptive.be</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">To serve static files from a directory during development, there still is the Seaside-Filesystem package.<br>
-> Load the 'Filesystem' group from ConfigurationOfSeaside3<br>
<br>
But I also do intend to replace it with serving static files from Zinc directly though. But, in the meantime, it's doing the job.<br>
<span class="HOEnZb"><font color="#888888"><br>
Johan<br>
</font></span><div class="im HOEnZb"><br>
On 10 Apr 2014, at 08:39, François Stephany <<a href="mailto:tulipe.moutarde@gmail.com">tulipe.moutarde@gmail.com</a>> wrote:<br>
<br>
> Ok. I've got quite a bit of external files, I'll roll my own ;)<br>
><br>
> thanks !<br>
> <br>
</div><div class="HOEnZb"><div class="h5">> _______________________________________________<br>
> seaside mailing list<br>
> <a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
> <a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
<br>
_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
</div></div></blockquote></div><br></div>