数数虚拟维度表导入脚本
This commit is contained in:
parent
b2ea4a87b7
commit
ae81a4a73a
@ -32,13 +32,15 @@ class SS_Virtual_command:
|
|||||||
body = {"projectId": projectId, "createParam": createParam, "loginName": loginName, "password": password}
|
body = {"projectId": projectId, "createParam": createParam, "loginName": loginName, "password": password}
|
||||||
quote_body = my_quote(body)
|
quote_body = my_quote(body)
|
||||||
|
|
||||||
r = requests.post(url=self.ss_virtual_url, header="Accept: application/json", files=filename, data=quote_body)
|
cmd = f"curl --header 'Accept: application/json' --form 'file=@{filename} {self.ss_virtual_url}?{quote_body}"
|
||||||
if r.status_code == requests.codes.ok:
|
print(cmd)
|
||||||
print(f"upload success,return={r.content}")
|
# r = requests.post(url=self.ss_virtual_url, header="Accept: application/json", files=filename, data=quote_body)
|
||||||
return True
|
# if r.status_code == requests.codes.ok:
|
||||||
else:
|
# print(f"upload success,return={r.content}")
|
||||||
print(f"upload failed,return={r.content}")
|
# return True
|
||||||
return False
|
# else:
|
||||||
|
# print(f"upload failed,return={r.content}")
|
||||||
|
# return False
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user