The "options" send_from_directoryare the same as sendfile:
flask.send_file(filename_or_fp, mimetype=None, as_attachment=False,
attachment_filename=None, add_etags=True,
cache_timeout=None, conditional=False,
last_modified=None)
So you should call it:
@app.route('/Download')
def Down():
rpm = request.args.get('rpm')
root = '/home/rpmbuild/RPMS/'
return send_from_directory(root,rpm,attachment_filename='foo.ext')
, , 'foo.ext' , . , as_attachment True.
, os.path.basename(..) :
import os
@app.route('/Download')
def Down():
rpm = request.args.get('rpm')
root = '/home/rpmbuild/RPMS/'
return send_from_directory(root,rpm,as_attachment=True,
attachment_filename=os.path.basename(rpm))