From d12ea91e1278b8ad08bd1844a14b256b7a2e8a6b Mon Sep 17 00:00:00 2001 From: zeldpol Date: Fri, 17 Feb 2023 19:23:11 +0200 Subject: [PATCH 1/2] Fix .webm upload No need to pass file content as a header, it causes the http error "431 Request Header Fields Too Large". --- telebot/apihelper.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/telebot/apihelper.py b/telebot/apihelper.py index a555f35..17c3e41 100644 --- a/telebot/apihelper.py +++ b/telebot/apihelper.py @@ -1612,8 +1612,6 @@ def create_new_sticker_set( payload[stype] = sticker if mask_position: payload['mask_position'] = mask_position.to_json() - if webm_sticker: - payload['webm_sticker'] = webm_sticker if sticker_type: payload['sticker_type'] = sticker_type return _make_request(token, method_url, params=payload, files=files, method='post') From 7a67d5f9f980eeb89315b075b11cee31582b1a6a Mon Sep 17 00:00:00 2001 From: Dmitry Date: Sat, 18 Feb 2023 22:36:29 +0200 Subject: [PATCH 2/2] Fix .webm async upload --- telebot/asyncio_helper.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/telebot/asyncio_helper.py b/telebot/asyncio_helper.py index 22ca554..6a92b87 100644 --- a/telebot/asyncio_helper.py +++ b/telebot/asyncio_helper.py @@ -1601,8 +1601,6 @@ async def create_new_sticker_set( payload[stype] = sticker if mask_position: payload['mask_position'] = mask_position.to_json() - if webm_sticker: - payload['webm_sticker'] = webm_sticker if sticker_type: payload['sticker_type'] = sticker_type return await _process_request(token, method_url, params=payload, files=files, method='post')