file size for upload to storage increased to 1 MB

This commit is contained in:
Bogdan Pilyugin 2023-10-31 20:03:54 +02:00
parent 51213d819c
commit 9ca0d153de
3 changed files with 7 additions and 7 deletions

View File

@ -88,7 +88,7 @@ menu "WebGUIApp"
config WEBGUIAPP_OTA_HOST config WEBGUIAPP_OTA_HOST
string "URL of firmware for OTA update" string "URL of firmware for OTA update"
default "https://iotronic.cloud/firmware/firmware.bin" default "https://openergy.ru/firmware/firmware.bin"
help help
URL of firmware file for OTA update URL of firmware file for OTA update

View File

@ -45,8 +45,8 @@
/* Max length a file path can have on storage */ /* Max length a file path can have on storage */
#define FILE_PATH_MAX (ESP_VFS_PATH_MAX + CONFIG_SPIFFS_OBJ_NAME_LEN) #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 (1000*1024) // 200 KB
#define MAX_FILE_SIZE_STR "200KB" #define MAX_FILE_SIZE_STR "1MB"
/* Scratch buffer size */ /* Scratch buffer size */
#define SCRATCH_BUFSIZE EXPECTED_MAX_DATA_SIZE #define SCRATCH_BUFSIZE EXPECTED_MAX_DATA_SIZE

View File

@ -38,8 +38,8 @@ function upload() {
/* Max size of an individual file. Make sure this /* Max size of an individual file. Make sure this
* value is same as that set in file_server.c */ * value is same as that set in file_server.c */
var MAX_FILE_SIZE = 200*1024; var MAX_FILE_SIZE = 1000*1024;
var MAX_FILE_SIZE_STR = "200KB"; var MAX_FILE_SIZE_STR = "1MB";
if (fileInput.length == 0) { if (fileInput.length == 0) {
alert("No file selected!"); alert("No file selected!");
@ -49,8 +49,8 @@ function upload() {
alert("File path on server cannot have spaces!"); alert("File path on server cannot have spaces!");
} else if (filePath[filePath.length-1] == '/') { } else if (filePath[filePath.length-1] == '/') {
alert("File name not specified after path!"); alert("File name not specified after path!");
} else if (fileInput[0].size > 200*1024) { } else if (fileInput[0].size > 1000*1024) {
alert("File size must be less than 200KB!"); alert("File size must be less than 1MB!");
} else { } else {
document.getElementById("newfile").disabled = true; document.getElementById("newfile").disabled = true;
document.getElementById("filepath").disabled = true; document.getElementById("filepath").disabled = true;