Rails File Download And View Update - Howto?

Solution 1:

Perhaps you could set a cookie in the response and poll for that cookie with javascript when the link to download the file is clicked.

The cookie can be set like this:

cookies["download_finished"] = "true"
send_data file, :filename=>fullname+".txt", :type=>"text/plain"

Then just periodically for that cookie using your favorite javascript framework.