add auth check

This commit is contained in:
2026-08-03 11:16:49 +08:00
parent 6330b99860
commit 92780cedef
18 changed files with 381 additions and 242 deletions
+2 -3
View File
@@ -16,7 +16,7 @@ from collections import deque
from get_V import measure_volume
from ind_collector import collect_data_with_prbs
from api import base_url, data_record_url, the_folder
from api import device_post, the_folder
class IdentificationManager:
@@ -66,12 +66,11 @@ class IdentificationManager:
"""
# Step 1: 向业务服务器申请一次性上传地址(不传文件内容)
try:
resp = requests.post(data_record_url, json={
result = device_post({
"type": "uploadDataFile",
"fileName": filename,
"folder": folder,
}, timeout=30)
result = resp.json()
except Exception as e:
self.log(f"向云服务器申请上传地址异常: {e}")
return False