I’m using Ruby on rails and I have videos that I don’t want users to download.
Where do I store the videos? From the name of the folder “Public” maybe this is a really stupid question, but is that an ok ok place to store the videos?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Store your files somewhere other than the public directory when you upload them, in say for instance,
downloadsand then you can send files to a user with a controller action like:That way you can authenticate the user with before filters and the file won’t be available publicly.
Further reading: http://www.therailsway.com/2009/2/22/file-downloads-done-right