file size for upload to storage increased to 1 MB
This commit is contained in:
parent
51213d819c
commit
9ca0d153de
2
Kconfig
2
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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user