title: How to give absolute path in send_from_directory Flask
body: <p>The send_from_directory function seems to take path supplied to it as a relative path to its project directory by default. How can we supply an absolute path to it?</p>
  
  <pre><code>    @app.route('/download/&lt;file&gt;',methods=['GET'])
      def download_function(file):
          return send_from_directory("~/Desktop", file, as_attachment=True)
  </code></pre>