[Seaside] Re: serving files from seaside

Rick Zaccone zaccone at bucknell.edu
Mon Mar 20 18:51:32 UTC 2006

> I've been unable to successfully serve any files from Seaside.
> (I've instead been saving the streams to an FTP site, and then
> serving from the FTP site to get around the problem...)
> The above code snippet raises more questions for me.  Does this code
> have to be executed every time the contents of the directory changes
> (every time a new file is produced)?   Do I need to create and update
> the files "index.htm" and "index.html" to reflect the contents of  
> the directory?
> Do I need to restart the HttpService on port 8080 every time a new  
> file
> is added to the directory.
> Suppose I want to serve a MIDI file named "some.midi", which sits  
> in the
> same directory pointed to by "FileDirectory default", and then have  
> my Seaside
> page load the file into a player as follows (having started Seaside
> and executed the HTTPServer code snippet quoted above):
> 		fileName = 'some.midi'.
> 		html
> 			attributeAt: 'src' put: fileName;
> 			attributeAt: 'controls' put: 'true';
> 			tag: 'embed'.
> Which doesn't work. I just see a question mark where the player  
> should be.
> So, should that first line instead be:
> fileName = 'http://localhost:9090/some.midi'.
> or
> fileName = 'http://localhost:8080/some.midi'.
> or
> fileName = 'http://localhost:9090/seaside/some.midi'.
> or
> fileName = 'http://localhost:8080/seaside/some.midi'.
> or
> Any of the above with "httpd" instead of "http"
> or
> fileName = 'http://some.midi'.
> or
> fileName = 'httpd://some.midi'.
> or
> fileName = 'seaside/some.midi'
> None of these seem to work.  Is it because an "index.html" file is  
> required (physically
> located on disk at the location pointed to by "FileDirectory  
> default")?   Where does
> the disk-based file directory intersect the file directory seen by  
> Seaside?
> Do "FileDirectory default" and "http://localhost:9090/seaside"  
> point to the same
> directory?
> I'll admit my knowledge of networking and the web is very  
> fragmentary, but hopefully
> there's a succinct way of accomplishing this simple operation....??
> Thanks, again, for any help,
> Jay

Have you tried

fileName := '/some.midi'.

That is, you need to replace = with := and the file name must be  
preceded with a /.


More information about the Seaside mailing list