Post file the correct way
This commit is contained in:
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)
|
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:
|
with open("latest-success", "r") as f:
|
||||||
latest_success = f.read().strip()
|
latest_success = f.read().strip()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user