For the moment lets create a model for one off downloads that have: file_id (from the file model) uid (a random value)
When the user has successfully filled in the password create a new entry in the OneOffDownload model and present them with a link such as /secure_download/<uid - from the OneOffDownload file>. If the link is accessed within 10 minutes of the created_at time_stamp (for example) let them download the file, otherwise present an error page and let them reenter the password. On 13 April 2011 14:48, Ivan K. <[email protected]> wrote: >>The thing to watch out for is that the link for the protected file >>should be a one time url so that anyone who copies the final link will >>not be able to download the file > That's the goal of this feature :) > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

