I am trying to download the file using flask. my code is as follows
@app.route('/Download')
def Down():
rpm = request.args.get('rpm')
root = '/home/rpmbuild/RPMS/'
return send_from_directory(root,rpm)
The name of the file is passed in the url. when i hit the url, I am able to download the file but the name of the file in always Download
. i need it to be actual name of the file. I have also tried send_file()
but it is also downloading it with the name Download
.