[Seaside] Got it! Serving external files

Carl Gundel carlg at libertybasic.com
Mon Apr 27 17:51:05 UTC 2009


Thanks for everyone's input.  I did finally figure out how to modify  
WADispatcher, WAFileHandler and WAExternalFileLibrary to do exactly  
what I need.  My modification permits a folder anywhere on the disk to  
be the root for publicly served files, and it supports arbitrarily  
nested subfolders.  It really wasn't hard to write once I understood  
where to look, and your assistance helped me to figure that out.  Once  
I wrote this modification I was able to use my application code as  
written for Seaside 2.6 and Web Toolkit on top of Seaside 2.8 and  
Opentalk without modification.

For example the following URL resolves to a file in the public folder

http://localhost:7777/myGraphic.png

And the following resolves to a file in a subfolder named 'other':

http://localhost:7777/other/yourGraphic.png

Of course if the folder/file isn't found it produces a 404 as it should.

The code is a little hack-ish as it is now, but I'll clean it up when  
I get a chance and make it available for others.  So thanks again.  :-)

-Carl Gundel
http://www.runbasic.com


More information about the seaside mailing list