[Seaside] Updateable permanent links
ramon.leon at allresnet.com
Mon Jan 29 16:05:31 UTC 2007
> -----Original Message-----
> From: seaside-bounces at lists.squeakfoundation.org
> [mailto:seaside-bounces at lists.squeakfoundation.org] On Behalf
> Of Jens Pall
> Sent: Sunday, January 28, 2007 11:45 AM
> To: The Squeak Enterprise Aubergines Server - general discussion.
> Subject: [Seaside] Updateable permanent links
> How can I implement permanent links in Seaside, meaning that
> if I update the content the URL points to, the URL does not
> change and still downloads the new content? I want to use
> this for file uploads and need to be able to pass the link
> around and having it work even if the file is updated later.
> Basically, I just want plain old web server functionality in
> this case.
> The problem I'm facing in Seaside is that when I upload new
> content it gets a new path (_s) since I don't know how to
> tell Seaside to keep the old URL.
> Pointing to an external file on the OS filesystem is not a
> solution since I want to store everything in Magma.
> Any help appreciated.
URLs in Seaside mean whatever you want them to mean. If you want
/someApp/someFileName.txt to link to a file in Magma, then simply look at
the url in your component's init
self loadFile: self session currentRequest url
self session expire.
Grab the file name, look it up in magma via your object model, and return
it. If you want those permanent URLs to be sessionless, just expire the
session on the way out. There may have been a project on Squeak map to add
long lived URLs to Seaside, but I forget what it was called, in any case,
this is simple to do yourself.
More information about the Seaside