add auth check
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user