On 13 April 2011 15:56, Ivan K. <[email protected]> wrote: > Lets say :file_id => 1, :uid => 9 > Link would be look like /secure_download/9 > How user gonna get the file? Aren't user would see the original link > to file while downloading?
When you render the links to the files, assuming that there is a page with a list of their files on it, you render /ordinary_download/xxx for a file without a password and /enter_password/yyy for a file with a password. If they successfully enter the password on the enter_password page create the OneTimeDownload entry and give them the link /secure_download/037GA738AE from which they can download the file. You should also check that the /ordinary_download/xxx link (when accessed by the controller) does not have a password associated so that they can't just enter /ordinary_download/yyy in the browser. -- 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.

