On Mon, Jun 22, 2009 at 10:58 AM, Vetrivel Vetrivel<[email protected]> wrote: > > send_file method is not working in rails . Here i have mentioned my > program . The program is > > filename = File.join(RAILS_ROOT, 'public', '4000.xls') > > send_file_options = { > :length => File.size( filename ), > :disposition => 'inline', > :status => "200 OK" > } > > send_file( filename , send_file_options ). Please help me to solve > this issue.
I can't see why the code doesn't work, other than the file may not be there. I do see however that you're streaming out of 'public' so you could just link to 4000.xls and bypass using Rails (it will be quicker and free up Rails to handle the next request) Andrew Timberlake http://ramblingsonrails.com http://MyMvelope.com - The SIMPLE way to manage your savings --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

