2.15 确认非截取泄漏内存
This commit is contained in:
parent
93c9832f1b
commit
66382a5242
@ -23,7 +23,7 @@ def process_file():
|
||||
file_url = data.get('file_url')
|
||||
# 参数校验
|
||||
if not file_url:
|
||||
return jsonify({'error': 'Missing file_url parameter'}), 400
|
||||
return jsonify({'error': 'Missing file_url parameter'})
|
||||
|
||||
# 生成唯一文件名
|
||||
file_ext = '.pdf'
|
||||
@ -41,7 +41,7 @@ def process_file():
|
||||
|
||||
# 处理结果
|
||||
if not result:
|
||||
return jsonify({'error': 'File processing failed'}), 500
|
||||
return jsonify({'error': 'File processing failed'})
|
||||
|
||||
# 构造响应数据(根据实际需要调整返回字段)
|
||||
response_data = {
|
||||
@ -56,8 +56,8 @@ def process_file():
|
||||
}
|
||||
}
|
||||
|
||||
return jsonify(response_data), 200
|
||||
return jsonify(response_data)
|
||||
|
||||
except Exception as e:
|
||||
# app.logger.error(f"Processing error: {str(e)}")
|
||||
return jsonify({'error': f'Internal server error: {str(e)}'}), 500
|
||||
return jsonify({'error': f'Internal server error: {str(e)}'})
|
||||
|
Loading…
x
Reference in New Issue
Block a user