Skip to content

Commit

Permalink
Fix for sendFile big files
Browse files Browse the repository at this point in the history
All internal functions supports uint32_t, but sendFile() has only uint16_t.
I spend an evening to understand why jpg from camera is broken
  • Loading branch information
kko-smol authored and Konstantin Kiselev committed Sep 18, 2022
1 parent 8476c1a commit e68a478
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/FastBot.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand All @@ -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);
}

Expand Down

0 comments on commit e68a478

Please sign in to comment.