From 53cd9d3ce9a58df1ba4fc0b042289fd159beee90 Mon Sep 17 00:00:00 2001 From: mrdog233o5 Date: Sat, 2 Sep 2023 16:13:27 +0800 Subject: cao --- index.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- cgit v1.2.3