From e68a478456951a312d61b9b157de270c9b33cd98 Mon Sep 17 00:00:00 2001 From: kko-smol Date: Mon, 19 Sep 2022 00:20:06 +0300 Subject: [PATCH] Fix for sendFile big files All internal functions supports uint32_t, but sendFile() has only uint16_t. I spend an evening to understand why jpg from camera is broken --- src/FastBot.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/FastBot.h b/src/FastBot.h index e183512..f11b354 100644 --- a/src/FastBot.h +++ b/src/FastBot.h @@ -789,10 +789,10 @@ class FastBot { } // ===================== FILE ===================== - uint8_t sendFile(uint8_t* buf, uint16_t length, FB_FileType type, const String& name, const String& id) { + uint8_t sendFile(uint8_t* buf, uint32_t length, FB_FileType type, const String& name, const String& id) { return _sendFile(buf, length, type, name, id); } - uint8_t sendFile(uint8_t* buf, uint16_t length, FB_FileType type, const String& name) { + uint8_t sendFile(uint8_t* buf, uint32_t length, FB_FileType type, const String& name) { return sendFile(buf, length, type, name, chatIDs); } @@ -805,10 +805,10 @@ class FastBot { } #endif - uint8_t editFile(uint8_t* buf, uint16_t length, FB_FileType type, const String& name, int32_t msgid, const String& id) { + uint8_t editFile(uint8_t* buf, uint32_t length, FB_FileType type, const String& name, int32_t msgid, const String& id) { return _editFile(buf, length, type, name, msgid, id); } - uint8_t editFile(uint8_t* buf, uint16_t length, FB_FileType type, const String& name, int32_t msgid) { + uint8_t editFile(uint8_t* buf, uint32_t length, FB_FileType type, const String& name, int32_t msgid) { return editFile(buf, length, type, name, msgid, chatIDs); }