[Seaside] WAFileLibrary / Resource Path
philippe.marschall at gmail.com
Thu Aug 2 20:40:48 UTC 2007
2007/8/2, Ken Treis <ken at miriamtech.com>:
> I'm using Amazon S3 to host my static content, which is easy enough
> to do using methods like WAImageTag>>resourceUrl:. But the content of
> the various file libraries is static too, so it seems like it'd make
> sense to host it on S3 as well.
> The problem I'm having is that the URLs of file library content isn't
> relative to the resource base -- so it always looks for /seaside/
> files/SULibrary/effects.js, where I'd really prefer something like:
> What would be the best way to refactor the code to accomplish this?
Right now the simplest thing do so is to remove SULibrary and all the
other libraries you want to be served over S3 from you application.
Then implement #updateRoot: in your root component :
super updateRoot: html.
html script resourceUrl: '/SULibary/effects.js'
> If nobody's interested in this sort of feature, then I guess I can
> hack it however I want. But if other people are interested, I'd like
> to know how to make it as useful as possible.
Make it work for you first. Then worry about the rest.
> It seems like this behavior should be configurable. Should I just
> make it use the resource base URL, or keep a separate base URL for
More information about the Seaside