So, when the user agrees to the terms (or performs whatever they need to
perform), mark their record in the RDBMS as having agreed.

You can create a custom dispatch on a given URL that has a guard around it
such that it will only match if the user has done what the user has had to
do.  The custom dispatch will serve the file.

On Tue, Aug 4, 2009 at 9:38 AM, DFectuoso <santiago1...@gmail.com> wrote:

>
> I'm guessing that the easier one would be the way to go.
> If the user clicks on agree to these terms and get a new screen with a
> link, that link must only be accessible after agreeing in the last
> screen.
>
> If it could be the other way(click and get the file), it seems like
> there would be no perma link to the file, and that would accomplish
> the "there's no other way to get this file but to agree to the terms"
>
> Right now I'm playing with the StreamingResponse but can't figure out
> how that code is called, do i create a menu item that will be
> accessible from a view and in the view i have that code? or what is
> the usual pattern for using that code?
>
> On Aug 4, 10:27 am, David Pollak <feeder.of.the.be...@gmail.com>
> wrote:
> > Can you be a little more specific about what you want to achieve?
> >
> > Do you want to have an "agree to these terms screen" and once that screen
> is
> > passed, then the user can access a link that contains the content?
> >
> > Or do you mean "once the user clicks on 'submit' on the agree to these
> > terms, the user immediately receives an file"?
> >
> >
> >
> > On Mon, Aug 3, 2009 at 9:23 PM, DFectuoso <santiago1...@gmail.com>
> wrote:
> >
> > > I'm working on some landing pages that need to capture some
> > > information and after getting that, i will let the user download a
> > > file. The problem is that those files need to be "protected" so, they
> > > cannot be downloaded without submitting the form. So hosting them in a
> > > url-accesible way seems like a mistake. What i need is to have the
> > > files in the server in a folder not accessible from url's. I'm
> > > guessing i will need lift to find and stream the files with the
> > > correct header.
> >
> > > Right now the form is done with JSON forms and the idea would be to
> > > continue doing so.
> >
> > > Any ideas where i should begin?
> >
> > > Things in my mind:
> > > -Opening files and streaming them this way would be too much stress
> > > for the server? if the files are big?
> > > -Is it the best solution?
> > > -I can use all the java file libraries, but is there a scala place i
> > > should look before jumping on the java way on something
> > > -Can i "automatically" decide the header i should use?
> >
> > > Thanks for any ideas and comments!
> >
> > --
> > Lift, the simply functional web frameworkhttp://liftweb.net
> > Beginning Scalahttp://www.apress.com/book/view/1430219890
> > Follow me:http://twitter.com/dpp
> > Git some:http://github.com/dpp
> >
>


-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to