谢谢
@app.route('/.blah.auth', methods=['GET'])
def downloadBlahAuth(roleLevel = app.config["PAGE_ROLE_LEVELS"][".blah.auth"]):
"""
filePath = os.path.join(app.config["DOWNLOADS_FOLDER"], ".blah.auth");
theFile = open(filePath, "r")
fileText = theFile.read()
theFile.close()
strIO = StringIO.StringIO()
strIO.write(fileText)
strIO.seek(0)
return send_file(strIO, attachment_filename=".blah.auth", as_attachment=True)
"""
fileName = ".blah.auth"
return send_from_directory(directory=app.config["DOWNLOADS_FOLDER"], filename=fileName)