On Fri, May 27, 2011 at 10:00 AM, Sayuj O.
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
send_file Rails.root.join(‘public’, ‘uploads’) +
(uploaded_file.original_filename + “.filtered”)
by the way it makes no sense to use send file here, since the file is in
pubic folder it can be served by the web server, if you were trying to
implement some sort of authorization is not working and the file and be
downloaded without authorization (unless you assign them in the web
Use send file when the files are out of the reach of the web server or
if you want to control access to the file move out of the public folder.