[Seaside] accessing files

Jay Hardesty jayh at panix.com
Sun Oct 30 20:11:20 UTC 2005

I think I can simplify my previous question about embedding MIDI.
It's really a question about accessing files (or file streams) in 

Say I create some file (in this 'some.mid').  That file now sits on
the local disk, on the same computer running the Comanche server.
Where do I need to copy that file, so that it can be accessed via
Seaside using (in a renderContentOn: method):
html attributeAt: 'src' put: 'some.mid'

For instance - if I upload the file to the public directory of a
web server on some remote site, I can access successfully access
the file using:
html attributeAt: 'src' put: 'http://www.somwhere.com/some.mid'

However I can't figure out how to accomplish the same thing on
the computer hosting Seaside itself.

I've tried each of the following:
html attributeAt: 'src' put: 'http://localhost:9090/some.mid'
html attributeAt: 'src' put: 'http://localhost:9090/seaside/some.mid'
html attributeAt: 'src' put: 
html attributeAt: 'src' put: 'some.mid'
html attributeAt: 'src' put: 'seaside/some.mid'
html attributeAt: 'src' put: 'seaside//myapp/some.mid'

But in each case the file cannot be found.

Do I need to somehow upload the file from disk, of from a stream,
into a Seaside (or Comanche) directory structure?  Do I need to
have some kind of file server running beyond the web server? I've
been looking through the tutorials but can't find any examples.

I did try starting a HttpService using an exmaple from the list:
ma := ModuleAssembly core.
ma serverRoot: FileDirectory default fullName.
ma documentRoot: FileDirectory default fullName.
ma directoryIndex: 'index.html index.htm'.
ma serveFiles.
(HttpService startOn: 8080 named: 'httpd') plug: ma rootModule
and then using:
html attributeAt: 'src' put: 'http://localhost:8080/some.mid'
but no luck there either.

Sorry if I'm missing something real obvious.
Thanks again very much for any pointers,

More information about the Seaside mailing list