Just so you know, with the x-sendfile option:

:x_sendfile - uses X-Sendfile to send the file when set to true. This
is currently only available with Lighttpd/Apache2 and specific modules
installed and activated. Since this uses the web server to send the
file, this may lower memory consumption on your server and it will not
block your application for further requests. See
http://blog.lighttpd.net/articles/2006/07/02/x-sendfile and
http://tn123.ath.cx/mod_xsendfile/ for details. Defaults to false.

On Fri, Jul 3, 2009 at 10:49 AM, Gavin<[email protected]> wrote:
>
> Alrighty...
>
> Was not aware of that.
> I think in this case it's best to go with the encrpted filename
> option because I'll might have loads of images to render per page.
>
> Thanks for your help guys.
>
> Gavin
>
>
> On Jul 3, 3:40 pm, Nicholas Henry <[email protected]> wrote:
>> You can send a file inline without streaming for an image (I'm using
>> this in an application):
>>
>> send_file path, :type => 'image/jpeg', :disposition =>
>> 'inline', :stream => false
>>
>> HTH,
>> Nicholas
>>
>> On Jul 3, 10:33 am, Gavin <[email protected]> wrote:
>>
>> > > Why not?  It sounds like exactly what you want -- a way to send an
>> > > arbitrary file that isn't in the public directory.
>>
>> > Isn't send_file for streaming the file to the user though?
>> > I'm only looking to load the image on screen, I don't want the users
>> > to actually download a copy of the file.
>>
>> > Thanks
>>
>> > Gavin
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to