title: Flask: send_from_directory and also refresh the page
body: <p>I am using send_from_directory in flask which will allow a user to download a certain file. What I want to achieve is that the page refreshes after the file is downloaded, but I'm unsure how I can achieve this with flask (if at all possible). Currently my code looks like this:</p>
  
  <pre><code>if report:
              location = Document_Generator(report).file_location
  
              return send_from_directory(location[0],
                                 location[1], as_attachment=True)
  </code></pre>
  
  <p>So my question is : How can I refresh the page (return a normal response with a template) as well as allowing the user to download the file?</p>