summaryrefslogtreecommitdiffstats
path: root/examples/FTPServerSample
diff options
context:
space:
mode:
Diffstat (limited to 'examples/FTPServerSample')
-rw-r--r--examples/FTPServerSample/FTPServerSample.ino50
1 files changed, 0 insertions, 50 deletions
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 <ESP8266WiFi.h>
-#elif defined ESP32
-#include <WiFi.h>
-#include "SPIFFS.h"
-#endif
-
-#include <ESP8266FtpServer.h>
-
-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();
-
-}