2.17 增加读文件pdf接口测试1
This commit is contained in:
parent
043a4dd950
commit
3a9bafc63f
@ -1,3 +1,5 @@
|
||||
import os
|
||||
|
||||
from flask import request, jsonify, Blueprint, g
|
||||
import uuid
|
||||
import time
|
||||
@ -23,10 +25,9 @@ def process_file():
|
||||
return jsonify({'error': 'Missing file_url parameter'})
|
||||
|
||||
# 生成唯一文件名
|
||||
file_ext = '.pdf'
|
||||
filename = f"{uuid.uuid4().hex}{file_ext}"
|
||||
filename = os.path.join(output_folder,'ztbfile.pdf')
|
||||
file_path,file_type=download_file(file_url, filename)
|
||||
print(file_path)
|
||||
# print(file_path)
|
||||
# 调用预处理函数
|
||||
start_time = time.time()
|
||||
result = preprocess_files(
|
||||
|
@ -1,3 +1,5 @@
|
||||
import os.path
|
||||
|
||||
from flask import request, jsonify, Blueprint, g
|
||||
import uuid
|
||||
import time
|
||||
@ -24,8 +26,7 @@ def process_file():
|
||||
return jsonify({'error': 'Missing file_url parameter'})
|
||||
|
||||
# 生成唯一文件名
|
||||
file_ext = '.pdf'
|
||||
filename = f"{uuid.uuid4().hex}{file_ext}"
|
||||
filename = os.path.join(output_folder,'ztbfile.pdf')
|
||||
file_path,file_type=download_file(file_url, filename)
|
||||
# print(file_path)
|
||||
# 调用预处理函数
|
||||
|
Loading…
x
Reference in New Issue
Block a user