summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormrdog233o5 <mr.dog233o5@gmail.com>2023-09-02 16:13:27 +0800
committermrdog233o5 <mr.dog233o5@gmail.com>2023-09-02 16:13:27 +0800
commit53cd9d3ce9a58df1ba4fc0b042289fd159beee90 (patch)
tree2bb4d4367384331d2ac05555f77766e71e408c83
parentd5e0296494f88a8e81bde744425c3e747eb78453 (diff)
cao
-rw-r--r--index.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/index.py b/index.py
index 534abb0..eb0defd 100644
--- a/index.py
+++ b/index.py
@@ -33,8 +33,9 @@ def handle_post_request():
'content': f"``file opened: {file[0]}``"
}
files = {
- "file" : (file[0],file[1].decode()) # The picture that we want to send in binary
+ "file" : (file[0],file[1].decode('ascii')) # The picture that we want to send in binary
}
+
response = requests.post(url, headers=header, data=payload, files=files)
else:
response = requests.post(url, headers=header, data=payload)