title: Ruby on Rails send_file doesn't work until i refresh the page?
body: <p>I am working on a Rails server which I can download my locally stored movies and anime etc from. This is kind of working but when I click the download link I have to refresh the page in order for the download to actually start.</p>
  
  <p>This is the controller that handles the download:</p>
  
  <pre><code>class DownloadController &lt; ApplicationController
    def index
      @title = params[:title]
      @name = params[:name]
      @path = '/media/sf_Anime,_VN,_LN/Watching, not watched yet/'+@title+'/'+@name
      send_file( @path )
    end
  end
  </code></pre>
  
  <p>and this is the link that links to that controller:</p>
  
  <pre><code>&lt;% @episodes.each do |x| %&gt;
  &lt;p&gt; &lt;%= x %&gt;&lt;%= link_to " Download", 
      {controller: 'download', action: 'index', title: @title, name: x } %&gt; &lt;/p&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p><strong>edit:</strong>
  I did some testing today and noticed that the download links work instantly if i try to send a smaller file (text or image). I also noticed that the download links actually works for the movies aswell but it takes 20-30 seconds for the download to start.
  Do you have any idea of what would cause this delay?</p>