9.26 分段解析完全版
This commit is contained in:
parent
8afb58e82b
commit
62e59e69a9
@ -178,7 +178,13 @@ def process_and_stream(file_url):
|
||||
'data': json.dumps(result, ensure_ascii=False)
|
||||
}
|
||||
yield f"data: {json.dumps(complete_response, ensure_ascii=False)}\n\n"
|
||||
|
||||
# 发送最终响应
|
||||
final_response = {
|
||||
'message': 'File uploaded and processed successfully',
|
||||
'filename': os.path.basename(downloaded_filepath),
|
||||
'data': 'END'
|
||||
}
|
||||
yield f"data: {json.dumps(final_response)}\n\n"
|
||||
|
||||
def validate_request():
|
||||
if not request.is_json:
|
||||
|
Loading…
x
Reference in New Issue
Block a user