Skip to content
This repository was archived by the owner on Jan 16, 2022. It is now read-only.

Commit 785de8a

Browse files
authored
Update sendPhotoESP8266.ino
fixed example
1 parent 781cf60 commit 785de8a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/sendPhotoESP8266/sendPhotoESP8266.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,13 +173,13 @@ void loop() {
173173
if (msg.text.equalsIgnoreCase("/photofs1")) {
174174
Serial.println("\nSending Photo from filesystem");
175175
String myFile = "telegram-bot1.jpg";
176-
myBot.sendPhotoByFile(msg.sender.id, myFile);
176+
myBot.sendPhotoByFile(msg.sender.id, myFile, LittleFS);
177177
}
178178

179179
else if (msg.text.equalsIgnoreCase("/photofs2")) {
180180
Serial.println("\nSending Photo from filesystem");
181181
String myFile = "telegram-bot2.jpg";
182-
myBot.sendPhotoByFile(msg.sender.id, myFile);
182+
myBot.sendPhotoByFile(msg.sender.id, myFile, LittleFS);
183183
}
184184

185185
else if (msg.text.indexOf("/photohost>") > -1 ) {
@@ -189,7 +189,7 @@ void loop() {
189189
listDir("/");
190190
Serial.println("\nSending Photo from LAN: ");
191191
Serial.println(url);
192-
myBot.sendPhotoByFile(msg.sender.id, fileName);
192+
myBot.sendPhotoByFile(msg.sender.id, fileName, LittleFS);
193193
LittleFS.remove("/" + fileName);
194194
listDir("/");
195195
}

0 commit comments

Comments
 (0)