File tree Expand file tree Collapse file tree 6 files changed +10
-10
lines changed Expand file tree Collapse file tree 6 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 11name =FastBot2
2- version =1.0.12
2+ version =1.0.13
33author =AlexGyver <
[email protected] >
44maintainer =AlexGyver <
[email protected] >
55sentence =Fast and universal Arduino/ESP8266/ESP32 library for Telegram bot
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ class FastBot2Client : public fb::Core {
5050 }
5151
5252// ============================== FILE ==============================
53- #ifndef FB_NO_FILE
53+ #if !defined( FB_NO_FILE) && defined(ESP8266) && defined(ESP32)
5454 // отправить файл, тип указывается в fb::File
5555 fb::Result sendFile (const fb::File& m, bool wait = true ) {
5656 fb::Packet p (m.multipart , _token);
Original file line number Diff line number Diff line change 1010#include < FS.h>
1111#endif
1212
13- #ifndef FB_NO_FILE
13+ #if !defined( FB_NO_FILE) && defined(ESP8266) && defined(ESP32)
1414#define FB_ATTACH " attach://"
1515
1616namespace fb {
Original file line number Diff line number Diff line change @@ -219,7 +219,7 @@ class Core : public Http {
219219 if (!_state) return 0 ;
220220
221221// OTA
222- #ifndef FB_NO_FILE
222+ #if !defined( FB_NO_FILE) && defined(ESP8266) && defined(ESP32)
223223 if (_ota != ota_t ::None) {
224224 if (_ota_id.length ()) {
225225 fb::Fetcher fetch = downloadFile (_ota_id);
@@ -385,7 +385,7 @@ class Core : public Http {
385385 return link;
386386 }
387387
388- #ifndef FB_NO_FILE
388+ #if !defined( FB_NO_FILE) && defined(ESP8266) && defined(ESP32)
389389 // скачать файл по id
390390 fb::Fetcher downloadFile (Text fileID) {
391391 FB_ESP_YIELD ();
@@ -426,7 +426,7 @@ class Core : public Http {
426426 CallbackRaw _cbRaw = nullptr ;
427427 CallbackError _cbErr = nullptr ;
428428
429- #ifndef FB_NO_FILE
429+ #if !defined( FB_NO_FILE) && defined(ESP8266) && defined(ESP32)
430430 ota_t _ota = ota_t ::None;
431431 String _ota_id;
432432 String _ota_user;
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ class Packet : public gson::string {
1919 public:
2020 Packet () : gson::string(200 ) {}
2121
22- #ifndef FB_NO_FILE
22+ #if !defined( FB_NO_FILE) && defined(ESP8266) && defined(ESP32)
2323 // отправка файла через multipart/form-data
2424 Packet (const Multipart& multipart, const String& token) : gson::string(200 ) {
2525 this ->multipart = &multipart;
@@ -88,7 +88,7 @@ class Packet : public gson::string {
8888 // print
8989 void printTo (Print& p) {
9090 switch (_type) {
91- #ifndef FB_NO_FILE
91+ #if !defined( FB_NO_FILE) && defined(ESP8266) && defined(ESP32)
9292 case Type::File: {
9393 Text formName = multipart->getFormName ();
9494 Text fileName = multipart->getFileName ();
@@ -148,7 +148,7 @@ class Packet : public gson::string {
148148 }
149149 }
150150
151- #ifndef FB_NO_FILE
151+ #if !defined( FB_NO_FILE) && defined(ESP8266) && defined(ESP32)
152152 const Multipart* multipart = nullptr ;
153153#endif
154154
Original file line number Diff line number Diff line change 66#include " Message.h"
77#include " ../Multipart.h"
88
9- #ifndef FB_NO_FILE
9+ #if !defined( FB_NO_FILE) && defined(ESP8266) && defined(ESP32)
1010namespace fb {
1111
1212class File : protected Message {
You can’t perform that action at this time.
0 commit comments