From 453e61d5dc538e19e545075818e94a9508501c44 Mon Sep 17 00:00:00 2001 From: Daniel Plasa Date: Sun, 24 May 2020 18:58:42 +0200 Subject: rewrite/reworks to also use LittleFS since SPIFFS has become deprecated Also modifications to support also active mode and performance tunings with the use of dynamic buffers when transfering file data. --- examples/FTPServerSample/FTPServerSample.ino | 50 ---------------------------- 1 file changed, 50 deletions(-) delete mode 100644 examples/FTPServerSample/FTPServerSample.ino (limited to 'examples/FTPServerSample/FTPServerSample.ino') diff --git a/examples/FTPServerSample/FTPServerSample.ino b/examples/FTPServerSample/FTPServerSample.ino deleted file mode 100644 index b8fa5f6..0000000 --- a/examples/FTPServerSample/FTPServerSample.ino +++ /dev/null @@ -1,50 +0,0 @@ -#ifdef ESP8266 -#include -#elif defined ESP32 -#include -#include "SPIFFS.h" -#endif - -#include - -const char* ssid = "YOUR_SSID"; -const char* password = "YOUR_PASS"; - - -FtpServer ftpSrv; //set #define FTP_DEBUG in ESP8266FtpServer.h to see ftp verbose on serial - - -void setup(void){ - Serial.begin(115200); - WiFi.begin(ssid, password); - Serial.println(""); - - // Wait for connection - while (WiFi.status() != WL_CONNECTED) { - delay(500); - Serial.print("."); - } - Serial.println(""); - Serial.print("Connected to "); - Serial.println(ssid); - Serial.print("IP address: "); - Serial.println(WiFi.localIP()); - - - /////FTP Setup, ensure SPIFFS is started before ftp; ///////// - - /////FTP Setup, ensure SPIFFS is started before ftp; ///////// -#ifdef ESP32 //esp32 we send true to format spiffs if cannot mount - if (SPIFFS.begin(true)) { -#elif defined ESP8266 - if (SPIFFS.begin()) { -#endif - Serial.println("SPIFFS opened!"); - ftpSrv.begin("esp8266","esp8266"); //username, password for ftp. set ports in ESP8266FtpServer.h (default 21, 50009 for PASV) - } -} -void loop(void){ - ftpSrv.handleFTP(); //make sure in loop you call handleFTP()!! - // server.handleClient(); //example if running a webserver you still need to call .handleClient(); - -} -- cgit v1.2.3