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.
On Mon, Jun 22, 2009 at 10:58 AM, Vetrivel
Vetrivel[email protected] wrote:
}
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 T.
http://ramblingsonrails.com
http://MyMvelope.com - The SIMPLE way to manage your savings