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?
@app.route('/download/<file>',methods=['GET'])
def download_function(file):
return send_from_directory("~/Desktop", file, as_attachment=True)