# Sending files through send\_file or by httpd?

**URL:** <https://www.ruby-forum.com/t/sending-files-through-send-file-or-by-httpd/62161>\
**Category:** Rails\
**Created:** [June 1, 2006, 12:33am UTC](https://www.ruby-forum.com/t/sending-files-through-send-file-or-by-httpd/62161 "2006-06-01T00:33:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kousen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/e19b73/32.png) [@kousen](https://www.ruby-forum.com/u/kousen)\
**Post date:** [June 1, 2006, 12:33am UTC](https://www.ruby-forum.com/t/sending-files-through-send-file-or-by-httpd/62161/1 "2006-06-01T00:33:43Z")

</div>

If I were to serve files, would send\_file via rails be slow?  
I think they will be 200mb avi files.

Would it be better to send them via /public ?

But I would like to track the clicks on each file - which makes me think  
that I can’t serve them out on /public as those clicks will not go  
through my application.

Any help or suggestions?

---

<div class="post-metadata">

**Author:** ![kousen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/e19b73/32.png) [@kousen](https://www.ruby-forum.com/u/kousen)\
**Post date:** [June 1, 2006, 12:58am UTC](https://www.ruby-forum.com/t/sending-files-through-send-file-or-by-httpd/62161/2 "2006-06-01T00:58:43Z")

</div>

On 1-jun-2006, at 0:33, Ken K. wrote:

> Any help or suggestions?  
> Do a redirect or make use of the lighttpd facilities for special  
> downloading. Lighttpd threads very well - an FCGI doesn’t thread at  
> all so you will be losing a whole dispatcher until the download is  
> complete.

–  
Julian ‘Julik’ Tarkhanov  
please send all personal mail to  
me at julik.nl

---

<div class="post-metadata">

**Author:** ![kousen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/e19b73/32.png) [@kousen](https://www.ruby-forum.com/u/kousen)\
**Post date:** [June 1, 2006, 1:32am UTC](https://www.ruby-forum.com/t/sending-files-through-send-file-or-by-httpd/62161/3 "2006-06-01T01:32:08Z")

</div>

Julian ‘Julik’ Tarkhanov wrote:

> On 1-jun-2006, at 0:33, Ken K. wrote:
> 
> > Any help or suggestions?  
> > Do a redirect or make use of the lighttpd facilities for special  
> > downloading. Lighttpd threads very well - an FCGI doesn’t thread at  
> > all so you will be losing a whole dispatcher until the download is  
> > complete.
> 
> –  
> Julian ‘Julik’ Tarkhanov  
> please send all personal mail to  
> me at julik.nl

And what if that redirected link is accidentally leaked? Is there a way  
to prevent that?

And could you elaborate on what lighttpd facilities there are for  
special downloading?

And thank you for answering the question :D.

---

<div class="post-metadata">

**Author:** ![kousen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/e19b73/32.png) [@kousen](https://www.ruby-forum.com/u/kousen)\
**Post date:** [June 1, 2006, 1:59am UTC](https://www.ruby-forum.com/t/sending-files-through-send-file-or-by-httpd/62161/4 "2006-06-01T01:59:38Z")

</div>

On 1-jun-2006, at 1:32, Ken K. wrote:

> special downloading?  
> [http://lighttpd.net/documentation/secdownload.html](http://lighttpd.net/documentation/secdownload.html)  
> –  
> Julian ‘Julik’ Tarkhanov  
> please send all personal mail to  
> me at julik.nl

---

<div class="post-metadata">

**Author:** ![kousen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/e19b73/32.png) [@kousen](https://www.ruby-forum.com/u/kousen)\
**Post date:** [June 1, 2006, 2:06am UTC](https://www.ruby-forum.com/t/sending-files-through-send-file-or-by-httpd/62161/5 "2006-06-01T02:06:36Z")

</div>

Julian ‘Julik’ Tarkhanov wrote:

> On 1-jun-2006, at 1:32, Ken K. wrote:
> 
> > special downloading?  
> > [http://lighttpd.net/documentation/secdownload.html](http://lighttpd.net/documentation/secdownload.html)  
> > –  
> > Julian ‘Julik’ Tarkhanov  
> > please send all personal mail to  
> > me at julik.nl

Cheers
