On Mar 26, 3:54 am, Jay Dev <[email protected]> wrote:
> This is an example.
>
> I tried this below code but it blocks mongrel until the whole file is
> read which is over 500 MB.
>
>   def download
>     
> send_data(open('http://mirrors.gigenet.com/ubuntu/intrepid/ubuntu-8.10-desktop-i386.i...,
>     :filename => 'ubuntu-8.10-desktop-i386.iso' ,
>     :type => 'application/force-download',
>     :disposition => 'attachment')
>   end
> --
> Posted viahttp://www.ruby-forum.com/.


Try using send_file function :)
http://apidock.com/rails/ActionController/Streaming/send_file

--~--~---------~--~----~------------~-------~--~----~
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