From c31c8d82be56f90c1d459b4162f38924d528102a Mon Sep 17 00:00:00 2001 From: fireworks88 Date: Sun, 5 Sep 2021 19:17:42 +0200 Subject: [PATCH] form encoding --- files/helpers/images.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/helpers/images.py b/files/helpers/images.py index 2f137691c..dc96e8f80 100644 --- a/files/helpers/images.py +++ b/files/helpers/images.py @@ -103,7 +103,7 @@ def upload_video(file): headers = {"Authorization": f"Client-ID {IMGUR_KEY}"} with open(file_path, 'rb') as f: try: - r = requests.post('https://api.imgur.com/3/upload', headers=headers, data={"video": f}) + r = requests.post('https://api.imgur.com/3/upload', headers=headers, files=[], data={"video": f}) r.raise_for_status() resp = r.json()['data']