isrpa 0.8.1__py3-none-any.whl → 0.8.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
isrpa/utils.py
CHANGED
@@ -35,25 +35,26 @@ def getPath(userName):
|
|
35
35
|
return response.json()
|
36
36
|
|
37
37
|
|
38
|
-
def upload_file(file_path,
|
38
|
+
def upload_file(file_path,dest_file,user_name):
|
39
39
|
"""
|
40
40
|
通知客户端上传文件
|
41
|
-
:param file_path
|
42
|
-
:param
|
41
|
+
:param file_path:待上传文件
|
42
|
+
:param dest_file:上传目标目录
|
43
43
|
:param port:
|
44
44
|
:return:
|
45
45
|
"""
|
46
46
|
|
47
47
|
address = os.environ.get("address", "192.168.12.249")
|
48
|
-
url = f"http://{address}/client/
|
48
|
+
url = f"http://{address}/client/noticeUpload"
|
49
49
|
print(url)
|
50
50
|
headers = {
|
51
51
|
'Content-Type': 'application/json', # 说明请求体是 JSON 格式
|
52
52
|
}
|
53
|
-
cmd_str = "/isearch/magicautoproxy/proxy_manager_cli upload --port "+port + " --localfile "+ file_path + " --destfile" +dic_path
|
54
53
|
# 请求体的数据
|
55
54
|
data = {
|
56
|
-
'
|
55
|
+
'file_path': file_path,
|
56
|
+
'dest_file': dest_file,
|
57
|
+
'user_name': user_name
|
57
58
|
}
|
58
59
|
print(data)
|
59
60
|
requests.post(url, headers=headers, json=data)
|
@@ -3,8 +3,8 @@ isrpa/Template.py,sha256=UP1uovLvJzXEPGo_hzLrIYOu3vZP8Cf6m3G2hGzQ6XA,1958
|
|
3
3
|
isrpa/Template_Exception.py,sha256=an6eQ1NMB8a9R-J0yyMdwHIZcZeDtdV5f7fWKZQsZ3s,819
|
4
4
|
isrpa/__init__.py,sha256=pG-YPVG0gJIJ6s4xcAz9S_CnUxpUcz33wl9eNUSgxGk,20
|
5
5
|
isrpa/message.py,sha256=N0s6hMaC5S-Pi4EhwcSp-ngfBTBQyW6ymU9sI9dUSeE,11329
|
6
|
-
isrpa/utils.py,sha256=
|
7
|
-
isrpa-0.8.
|
8
|
-
isrpa-0.8.
|
9
|
-
isrpa-0.8.
|
10
|
-
isrpa-0.8.
|
6
|
+
isrpa/utils.py,sha256=U3zz5fgc8NzpEVg6kIZVPziTMwtvZaA1vE3A2qwD7qU,50825
|
7
|
+
isrpa-0.8.2.dist-info/METADATA,sha256=NuEvTGnNtdysHOiACjyRsJZPcAyMGQo15SN2ckVBa2Q,459
|
8
|
+
isrpa-0.8.2.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
|
9
|
+
isrpa-0.8.2.dist-info/top_level.txt,sha256=J5HJbtR2WAeKnW1rrpkiuapwnlswv3RgM-riyZD87o0,6
|
10
|
+
isrpa-0.8.2.dist-info/RECORD,,
|
File without changes
|