[Seaside] Re: serving files from seaside

Yanni Chiu yanni at rogers.com
Fri Feb 24 02:03:53 UTC 2006


Brad Fuller wrote:
> How can I serve a file from seaside?

If the question were about serving files from Squeak/Kom/Seaside,
then there's an answer in the description for KomHttpServer at:
   http://map.squeak.org/package/0fdb5ffc-cfa1-4d40-96c2-fe325bc8ba5f

Here's the code from that page:

| ma seaside |
seaside := WAKom default.
ma := ModuleAssembly core.
ma serverRoot: FileDirectory default fullName.
ma alias: '/seaside' to: [ma addPlug: [:request | seaside process: request]].
ma documentRoot: FileDirectory default fullName.
ma directoryIndex: 'index.html index.htm'.
ma serveFiles.
(HttpService startOn: 8080 named: 'httpd') plug: ma rootModule

Also, have a look at my posting from half-an-hour prior to yours,
about seasidehosting.st

Note that it's likely that the file will be read into Squeak memory
before being served. That may or may not be a problem.



More information about the Seaside mailing list