serving files from seaside

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

serving files from seaside

Brad Fuller
How can I serve a file from seaside?
I've seen old email that says to have apache do it. (if so, how within
seaside?)

details:
I have audio files (currently in a subdir under the squeak image) that
I'd like to push out to the client.
However, I can't figure out how to set do it. I've looked and tried
various settings with no luck.

I simply want the user to be able to press a link and get an mp3 file.
Seems easy, but for the life of me, I can't find out how to do it!
I figured this would do it:
html anchorWithUrl: 'AudioData/mp3File.mp3' do: "Play me".

shouldn't it be that easy?

brad
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: serving files from seaside

Yanni Chiu
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.

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside