Reputation: 42865
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?
Upvotes: 3
Views: 1095
Reputation: 33
Just remove the right-click "save" option from the html5 videos
$(document).ready(function(){
$('video').bind('contextmenu',function() { return false; });
});
Upvotes: 2
Reputation: 6046
Store your files somewhere other than the public directory when you upload them, in say for instance, downloads
and then you can send files to a user with a controller action like:
def download
send_file '/home/apps/myapp/downloads/video.mp4'
end
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
Upvotes: 2
Reputation: 19251
Users can download anything they can see. If you don't want anyone to access those videos, don't put them on the web.
Perhaps I don't understand your question; if so, please clarify.
Upvotes: 2