I am using the send_file method to download a file. It works fine on my local machine. But it’s not working on the server – it returns a blank file.
code:
send_file Rails.root.join('public', 'uploads') + (uploaded_file.original_filename + ".filtered")
Please help.
Depending on what web server you are using, you may have to change the sendfile settings in your
config/environments/production.rb.For example, for
nginx, you need to uncomment out this line: