FLASK 文件下载

正文索引 [隐藏]

FLASK 推送静态文件到客户端

filename = “文件名称”
directory = '文件路径,网上说必须要存储在stats目录下的文件才可以'
response = make_response(send_from_directory(directory, filename, as_attachment=True))
return response