python flask实现文件流下载

response = make_response('文件二进制')
        response.headers["Content-Disposition"] = "attachment; filename=%s" % file_name
        response.headers["Content-type"] = "text/csv"
        response.headers["access-control-expose-headers"] = "Content-disposition"
return response

 

posted @ 2022-04-07 11:04  阿磊小哥哥呀  阅读(789)  评论(0编辑  收藏  举报