# Send\_file and streaming

**URL:** <https://www.ruby-forum.com/t/send-file-and-streaming/103471>\
**Category:** Rails\
**Created:** [May 6, 2007, 4:47pm UTC](https://www.ruby-forum.com/t/send-file-and-streaming/103471 "2007-05-06T16:47:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![guillaume](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/c67d28/32.png) [@guillaume](https://www.ruby-forum.com/u/guillaume)\
**Post date:** [May 6, 2007, 4:47pm UTC](https://www.ruby-forum.com/t/send-file-and-streaming/103471/1 "2007-05-06T16:47:08Z")

</div>

Hi,

I ve got a very simple question,  
I want to stream via quictime a file wich is not in the public folder…  
so my JS template for the streaming is :

So in order to make it works i need to change the “PATH OF THE VIDEO” by  
the path of it… the only way i see is using something like  
send\_file… but howto do that…?. i guess if i do a send\_file the file  
will be sent to the user but it s not going to be stream via my JS  
template and quicktime…

(and it s not possible to use a send\_file directly in a view, i ve got  
error"…

Thx for any idea

Guillaume.

---

<div class="post-metadata">

**Author:** ![guillaume](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/c67d28/32.png) [@guillaume](https://www.ruby-forum.com/u/guillaume)\
**Post date:** [May 18, 2007, 5:29pm UTC](https://www.ruby-forum.com/t/send-file-and-streaming/103471/2 "2007-05-18T17:29:40Z")

</div>

I had this problem too, but the only way i found, was to let the video  
in the public folder (inside subfolder…), and you just need to  
implement an ht.access on the folder, so nobody will be able to access  
your video by entering [Fastest Web Hosting Services | Buy High Quality Hosting](http://www.YOURWEBSITE.com/VIDEO) etc…  
By the way send\_file is not quiet good, google “x-sendfile”…

Guillaume.
