Im looking for a way to download a xml file. I use:
file_path = 'folder/' + xml_name + '.xml'
send_file file_path, :type => "text/xml"
but this always downloads me an empty file. The file itself has 16 KB of data in it...
why is that?
Maechi
probably you have to comment out
config.action_dispatch.x_sendfile_header = "X-Sendfile"
in production.rb
see http://vijaydev.wordpress.com/2010/12/15/rails-3-and-apache-x-sendfile/ for explanations
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With