From 010010f8a1d066a68533e32575370abae16769ae Mon Sep 17 00:00:00 2001 From: nailbuster Date: Wed, 18 Oct 2017 12:59:52 -0400 Subject: ESP32 Support Changes A few fixes and support for ESP32 --- examples/FTPServerSample/FTPServerSample.ino | 46 ++++++++-------------------- 1 file changed, 13 insertions(+), 33 deletions(-) (limited to 'examples/FTPServerSample') diff --git a/examples/FTPServerSample/FTPServerSample.ino b/examples/FTPServerSample/FTPServerSample.ino index 06223df..b8fa5f6 100644 --- a/examples/FTPServerSample/FTPServerSample.ino +++ b/examples/FTPServerSample/FTPServerSample.ino @@ -1,35 +1,18 @@ +#ifdef ESP8266 #include -#include -#include +#elif defined ESP32 +#include +#include "SPIFFS.h" +#endif + #include const char* ssid = "YOUR_SSID"; const char* password = "YOUR_PASS"; -ESP8266WebServer server(80); -FtpServer ftpSrv; //set #define FTP_DEBUG in ESP8266FtpServer.h to see ftp verbose on serial - - -void handleRoot() { - server.send(200, "text/plain", "hello from esp8266!"); - -} +FtpServer ftpSrv; //set #define FTP_DEBUG in ESP8266FtpServer.h to see ftp verbose on serial -void handleNotFound(){ - String message = "File Not Found\n\n"; - message += "URI: "; - message += server.uri(); - message += "\nMethod: "; - message += (server.method() == HTTP_GET)?"GET":"POST"; - message += "\nArguments: "; - message += server.args(); - message += "\n"; - for (uint8_t i=0; i