Add hotfix script

This commit is contained in:
Willy-JL
2023-03-29 16:55:17 +01:00
parent 9ff5dfcb50
commit ebaf31d0b9
4 changed files with 158 additions and 0 deletions

View File

@@ -6,6 +6,10 @@ if __name__ == "__main__":
client.login(os.environ["NC_USER"], os.environ["NC_PASS"])
file = os.environ["NC_FILE"]
path = os.environ["NC_PATH"] + file
try:
client.delete(path)
except Exception:
pass
client.put_file(path, file)
share_link = client.share_file_with_link(path).get_link()
download_link = share_link.rstrip("/") + "/download/" + file