# Question about securing videos

**URL:** <https://www.ruby-forum.com/t/question-about-securing-videos/195614>\
**Category:** Rails\
**Created:** [September 26, 2010, 11:44pm UTC](https://www.ruby-forum.com/t/question-about-securing-videos/195614 "2010-09-26T23:44:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![egervari](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/9dc877/32.png) [@egervari](https://www.ruby-forum.com/u/egervari)\
**Post date:** [September 26, 2010, 11:44pm UTC](https://www.ruby-forum.com/t/question-about-securing-videos/195614/1 "2010-09-26T23:44:14Z")

</div>

Assuming you want to stream some flv videos, what is the best way to  
secure them via authentication while also embedding them in some kind  
of web flash player?

---

<div class="post-metadata">

**Author:** ![egervari](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/9dc877/32.png) [@egervari](https://www.ruby-forum.com/u/egervari)\
**Post date:** [September 27, 2010, 2:24pm UTC](https://www.ruby-forum.com/t/question-about-securing-videos/195614/2 "2010-09-27T14:24:37Z")

</div>

Here’s a good walk-through explaining some solutions to this problem.  
Basically, you create a view that streams the file to the visitor with  
send\_file from a protected location – not the usual public/system  
space enjoyed by a normal Paperclip install.

> **[Authenticated attachments in Rails with Paperclip |
    
    Everyday Rails](https://everydayrails.com/2010/07/08/authenticated-attachments-paperclip-rails.html)**
>
> Thoughtbot's Paperclip gem makes uploading files through web forms a breeze, but sometimes you need to keep those files protected from the general public. Here's how I require authenticated access to uploaded files in my Rails apps. Updated July 10,...

Walter

---

<div class="post-metadata">

**Author:** ![egervari](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/9dc877/32.png) [@egervari](https://www.ruby-forum.com/u/egervari)\
**Post date:** [September 27, 2010, 11:22am UTC](https://www.ruby-forum.com/t/question-about-securing-videos/195614/3 "2010-09-27T11:22:33Z")

</div>

I’m having the same trouble with securing my videos for my latest app. A  
simple before\_filter can stop the user from accessing the page, but once  
the video streams via a web player, the user can easily steal it.

Only solution I can think of is to use amazon s3’s url expiration, but  
that gets overly complicated.

-sunny  
[http://ezror.com](http://ezror.com)
