diff options
| -rw-r--r-- | index.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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) |
