change to flask 2.0
This commit is contained in:
parent
223aba983f
commit
8212a2b32f
|
@ -6,3 +6,4 @@ __pycache__
|
|||
|
||||
|
||||
/app/projects/*
|
||||
!/app/projects/test/
|
|
@ -98,7 +98,7 @@ def get_json():
|
|||
# 本线默认目录时app下,所以不需要再加/app了,所以不能用PROJECT_PATH
|
||||
# 2.创建response对象返回数据
|
||||
#使用response可以将result.json再删除掉
|
||||
response = make_response(send_from_directory('', filename=DOWNLOAD_FILE_LOCATION.format(project_name),
|
||||
response = make_response(send_from_directory(directory='', path=DOWNLOAD_FILE_LOCATION.format(project_name),
|
||||
as_attachment=True))
|
||||
response.headers["Content-disposition"] = 'attachment; filename={}_result.json'.format(project_name)
|
||||
# print(PROJECT_PATH.format(project_name)+'/result.json')
|
||||
|
|
Loading…
Reference in New Issue