summaryrefslogtreecommitdiffstats
path: root/examples/FTPServerSample
diff options
context:
space:
mode:
authorDaniel Plasa <dplasa@gmail.com>2020-05-24 18:58:42 +0200
committerDaniel Plasa <dplasa@gmail.com>2020-05-24 18:58:42 +0200
commit453e61d5dc538e19e545075818e94a9508501c44 (patch)
tree4e1d4aae43bf8bdde9bbf5bfba27922eb9d0fbb7 /examples/FTPServerSample
parentMerge pull request #20 from sandtec65/master (diff)
downloadFTPCLientServer-453e61d5dc538e19e545075818e94a9508501c44.tar
FTPCLientServer-453e61d5dc538e19e545075818e94a9508501c44.tar.gz
FTPCLientServer-453e61d5dc538e19e545075818e94a9508501c44.tar.bz2
FTPCLientServer-453e61d5dc538e19e545075818e94a9508501c44.tar.lz
FTPCLientServer-453e61d5dc538e19e545075818e94a9508501c44.tar.xz
FTPCLientServer-453e61d5dc538e19e545075818e94a9508501c44.tar.zst
FTPCLientServer-453e61d5dc538e19e545075818e94a9508501c44.zip
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();
-
-}