Post file the correct way

This commit is contained in:
augustin64 2025-03-19 17:34:28 +01:00
parent 21a19d4869
commit dab704a07d

@ -20,10 +20,9 @@ def raiseWebhook(message, file=None):
}]
}
if file is not None:
data[files]={"file": open(file, "rb")}
requests.post(config.ERROR_WEBHOOK, json=data)
if file is not None:
requests.post(config.ERROR_WEBHOOK, files={"file": open(file, "rb")})
with open("latest-success", "r") as f:
latest_success = f.read().strip()