mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 14:42:18 +03:00
финальная версия с двумя серверами esp8266 и esp32
This commit is contained in:
@@ -7,9 +7,14 @@ AsyncWebServer server(80);
|
||||
#endif
|
||||
|
||||
#ifdef STANDARD_WEB_SERVER
|
||||
#ifdef ESP8266
|
||||
ESP8266HTTPUpdateServer httpUpdater;
|
||||
ESP8266WebServer HTTP(80);
|
||||
#endif
|
||||
#ifdef ESP32
|
||||
WebServer HTTP(80);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//глобальные переменные
|
||||
String settingsFlashJson = "{}"; //переменная в которой хранятся все настройки, находится в оперативной памяти и синхронизированна с flash памятью
|
||||
|
||||
@@ -24,7 +24,7 @@ void standWebServerInit() {
|
||||
File fsUploadFile;
|
||||
|
||||
void standWebServerFiles() {
|
||||
#ifdef RSET_FILE_OPERATIONS
|
||||
#ifdef REST_FILE_OPERATIONS
|
||||
SPIFFS.begin();
|
||||
{
|
||||
Dir dir = SPIFFS.openDir("/");
|
||||
@@ -107,7 +107,7 @@ String getContentType(String filename) {
|
||||
return "text/plain";
|
||||
}
|
||||
|
||||
#ifdef RSET_FILE_OPERATIONS
|
||||
#ifdef REST_FILE_OPERATIONS
|
||||
// Здесь функции для работы с файловой системой
|
||||
void handleFileUpload() {
|
||||
if (HTTP.uri() != "/edit") return;
|
||||
|
||||
Reference in New Issue
Block a user