Hi
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. Thanks, JP _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
> -----Original Message----- > From: [hidden email] > [mailto:[hidden email]] 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 > > Hi > > 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. > > Thanks, > JP 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 initialize 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. Ramon Leon http://onsmalltalk.com _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
2007/1/29, Ramon Leon <[hidden email]>:
> > > > -----Original Message----- > > From: [hidden email] > > [mailto:[hidden email]] 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 > > > > Hi > > > > 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. > > > > Thanks, > > JP > > 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 > > initialize > self loadFile: self session currentRequest url You can acutally override #initialRequest: on your component for such situations. Or write your own request handler (probably subclass of WAEntryPoint or something like that). Philippe > 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. > > Ramon Leon > http://onsmalltalk.com > > _______________________________________________ > Seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Philippe Marschall wrote:
> 2007/1/29, Ramon Leon <[hidden email]>: >> >> 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 >> >> initialize >> self loadFile: self session currentRequest url > > You can acutally override #initialRequest: on your component for such > situations. Or write your own request handler (probably subclass of > WAEntryPoint or something like that). > > Philippe > >> 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. >> >> Ramon Leon >> http://onsmalltalk.com Thanks guys. I'll have to explore this a bit and see if it is enough to get me going. Cheers, JP _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Philippe Marschall
> You can acutally override #initialRequest: on your component > for such situations. Or write your own request handler > (probably subclass of WAEntryPoint or something like that). > > Philippe Good point, I'd forgotten about that. _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |