From 9ca0d153de98ab967842e431647ce13ec56a3a72 Mon Sep 17 00:00:00 2001 From: bogdan Date: Tue, 31 Oct 2023 20:03:54 +0200 Subject: [PATCH] file size for upload to storage increased to 1 MB --- Kconfig | 2 +- include/HTTPServer.h | 4 ++-- upload_script.html | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Kconfig b/Kconfig index b811068..fa0d569 100644 --- a/Kconfig +++ b/Kconfig @@ -88,7 +88,7 @@ menu "WebGUIApp" config WEBGUIAPP_OTA_HOST string "URL of firmware for OTA update" - default "https://iotronic.cloud/firmware/firmware.bin" + default "https://openergy.ru/firmware/firmware.bin" help URL of firmware file for OTA update diff --git a/include/HTTPServer.h b/include/HTTPServer.h index 0a6c9c6..2f9d5bd 100644 --- a/include/HTTPServer.h +++ b/include/HTTPServer.h @@ -45,8 +45,8 @@ /* Max length a file path can have on storage */ #define FILE_PATH_MAX (ESP_VFS_PATH_MAX + CONFIG_SPIFFS_OBJ_NAME_LEN) -#define MAX_FILE_SIZE (200*1024) // 200 KB -#define MAX_FILE_SIZE_STR "200KB" +#define MAX_FILE_SIZE (1000*1024) // 200 KB +#define MAX_FILE_SIZE_STR "1MB" /* Scratch buffer size */ #define SCRATCH_BUFSIZE EXPECTED_MAX_DATA_SIZE diff --git a/upload_script.html b/upload_script.html index c3bc094..9c894b1 100644 --- a/upload_script.html +++ b/upload_script.html @@ -38,8 +38,8 @@ function upload() { /* Max size of an individual file. Make sure this * value is same as that set in file_server.c */ - var MAX_FILE_SIZE = 200*1024; - var MAX_FILE_SIZE_STR = "200KB"; + var MAX_FILE_SIZE = 1000*1024; + var MAX_FILE_SIZE_STR = "1MB"; if (fileInput.length == 0) { alert("No file selected!"); @@ -49,8 +49,8 @@ function upload() { alert("File path on server cannot have spaces!"); } else if (filePath[filePath.length-1] == '/') { alert("File name not specified after path!"); - } else if (fileInput[0].size > 200*1024) { - alert("File size must be less than 200KB!"); + } else if (fileInput[0].size > 1000*1024) { + alert("File size must be less than 1MB!"); } else { document.getElementById("newfile").disabled = true; document.getElementById("filepath").disabled = true;