I'm sure that I'm missing something rather obvious here...
My file uploading is essentially the way in the Seaside book (http://book.seaside.st/book/fundamentals/forms/fileupload). Is there an easy way to link to the file on the disk so that nginx will serve it instead of streaming it through the image again? Otherwise, it seems like I need to open the file and create the WAMimeDocument for a response of some sort. Thanks, RS _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
<base href="x-msg://1029/">configure the httpd to use it and make in the seaside app a x-sendfile kind of link
take a look: o/ On Sep 12, 2011, at 12:57 PM, Robert Sirois wrote:
_______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
On 12 September 2011 17:06, Sebastian Sastre <[hidden email]> wrote:
or if you don't mind the file being publicly visible, just ensure that Nginx will serve the file directly then return a link to it; WAResponse>>#location:
_______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Yea, there needs to be some obfuscation. I tried going back and reading some related threads, but couldn't quite pinpoint what I'm looking for.
Thanks so far.. I'll get to it tonight again hopefully. RS Date: Mon, 12 Sep 2011 17:16:13 +0100 Subject: Re: [Seaside] File Download Link From: [hidden email] To: [hidden email] On 12 September 2011 17:06, Sebastian Sastre <sebastian@...> wrote:
or if you don't mind the file being publicly visible, just ensure that Nginx will serve the file directly then return a link to it; WAResponse>>#location:
_______________________________________________ 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 |
In reply to this post by Nick
If I do something like this in a callback...
self requestContext respond: [:response | response location: index localURL. ]. ... nothing happens. If I just do "#url: index localURL;" it works fine, but then the path is totally public of course. The callbacks are kind of nifty because the urls are unique. RS Date: Mon, 12 Sep 2011 17:16:13 +0100 Subject: Re: [Seaside] File Download Link From: [hidden email] To: [hidden email] On 12 September 2011 17:06, Sebastian Sastre <[hidden email]> wrote:
or if you don't mind the file being publicly visible, just ensure that Nginx will serve the file directly then return a link to it; WAResponse>>#location:
_______________________________________________ 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 |
I'm not really sure what you're asking. But the Location: header has
no effect in a 200 HTTP OK response. Normally you use it with a 302, though the spec defines behaviour for a number of others. Julian On Tue, Sep 13, 2011 at 2:39 AM, Robert Sirois <[hidden email]> wrote: > If I do something like this in a callback... > self requestContext respond: [:response | > response location: index localURL. > ]. > ... nothing happens. If I just do "#url: index localURL;" it works fine, but > then the path is totally public of course. > The callbacks are kind of nifty because the urls are unique. > RS > ________________________________ > Date: Mon, 12 Sep 2011 17:16:13 +0100 > Subject: Re: [Seaside] File Download Link > From: [hidden email] > To: [hidden email] > > > > On 12 September 2011 17:06, Sebastian Sastre <[hidden email]> > wrote: > > configure the httpd to use it and make in the seaside app a x-sendfile kind > of link > take a look: > http://wiki.nginx.org/XSendfile > sebastian > o/ > > or if you don't mind the file being publicly visible, just ensure that Nginx > will serve the file directly then return a link to it; > WAResponse>>#location: > > _______________________________________________ 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 > > seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Oh hm. Does it really make sense to respond with a file then? I'll be honest... my technical expertise is severely lacking in this area.
RS > From: jfitzell@gmail.com > Date: Thu, 15 Sep 2011 09:08:33 +0100 > Subject: Re: [Seaside] File Download Link > To: seaside@lists.squeakfoundation.org > > I'm not really sure what you're asking. But the Location: header has > no effect in a 200 HTTP OK response. Normally you use it with a 302, > though the spec defines behaviour for a number of others. > > Julian > > On Tue, Sep 13, 2011 at 2:39 AM, Robert Sirois <watchlala@hotmail.com> wrote: > > If I do something like this in a callback... > > self requestContext respond: [:response | > > response location: index localURL. > > ]. > > ... nothing happens. If I just do "#url: index localURL;" it works fine, but > > then the path is totally public of course. > > The callbacks are kind of nifty because the urls are unique. > > RS > > ________________________________ > > Date: Mon, 12 Sep 2011 17:16:13 +0100 > > Subject: Re: [Seaside] File Download Link > > From: nick.ager@gmail.com > > To: seaside@lists.squeakfoundation.org > > > > > > > > On 12 September 2011 17:06, Sebastian Sastre <sebastian@flowingconcept.com> > > wrote: > > > > configure the httpd to use it and make in the seaside app a x-sendfile kind > > of link > > take a look: > > http://wiki.nginx.org/XSendfile > > sebastian > > o/ > > > > or if you don't mind the file being publicly visible, just ensure that Nginx > > will serve the file directly then return a link to it; > > WAResponse>>#location: > > > > _______________________________________________ seaside mailing list > > seaside@lists.squeakfoundation.org > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > _______________________________________________ > > seaside mailing list > > seaside@lists.squeakfoundation.org > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
As long as you set the status to a redirect (3xx) code, returning a
link to a file somewhere else ought to work fine. On Thu, Sep 15, 2011 at 4:50 PM, Robert Sirois <[hidden email]> wrote: > Oh hm. Does it really make sense to respond with a file then? I'll be > honest... my technical expertise is severely lacking in this area. > > RS > >> From: [hidden email] >> Date: Thu, 15 Sep 2011 09:08:33 +0100 >> Subject: Re: [Seaside] File Download Link >> To: [hidden email] >> >> I'm not really sure what you're asking. But the Location: header has >> no effect in a 200 HTTP OK response. Normally you use it with a 302, >> though the spec defines behaviour for a number of others. >> >> Julian >> >> On Tue, Sep 13, 2011 at 2:39 AM, Robert Sirois <[hidden email]> >> wrote: >> > If I do something like this in a callback... >> > self requestContext respond: [:response | >> > response location: index localURL. >> > ]. >> > ... nothing happens. If I just do "#url: index localURL;" it works fine, >> > but >> > then the path is totally public of course. >> > The callbacks are kind of nifty because the urls are unique. >> > RS >> > ________________________________ >> > Date: Mon, 12 Sep 2011 17:16:13 +0100 >> > Subject: Re: [Seaside] File Download Link >> > From: [hidden email] >> > To: [hidden email] >> > >> > >> > >> > On 12 September 2011 17:06, Sebastian Sastre >> > <[hidden email]> >> > wrote: >> > >> > configure the httpd to use it and make in the seaside app a x-sendfile >> > kind >> > of link >> > take a look: >> > http://wiki.nginx.org/XSendfile >> > sebastian >> > o/ >> > >> > or if you don't mind the file being publicly visible, just ensure that >> > Nginx >> > will serve the file directly then return a link to it; >> > WAResponse>>#location: >> > >> > _______________________________________________ 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 >> > >> > >> _______________________________________________ >> 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 > > seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |