add debug, changed upload size to 8MB

This commit is contained in:
Frank Haverland
2022-09-25 17:22:24 +02:00
parent 0d67282c00
commit 89c65f6226

View File

@@ -49,8 +49,8 @@ extern "C" {
/* Max size of an individual file. Make sure this
* value is same as that set in upload_script.html */
#define MAX_FILE_SIZE (2000*1024) // 200 KB
#define MAX_FILE_SIZE_STR "2000KB"
#define MAX_FILE_SIZE (8000*1024) // 8 MB
#define MAX_FILE_SIZE_STR "8MB"
/* Scratch buffer size */
@@ -489,7 +489,7 @@ static esp_err_t upload_post_handler(httpd_req_t *req)
while (remaining > 0) {
ESP_LOGI(TAG_FILESERVER, "Remaining size : %d", remaining);
//ESP_LOGI(TAG_FILESERVER, "Remaining size : %d", remaining);
/* Receive the file part by part into a buffer */
if ((received = httpd_req_recv(req, buf, MIN(remaining, SCRATCH_BUFSIZE))) <= 0) {
if (received == HTTPD_SOCK_ERR_TIMEOUT) {
@@ -757,7 +757,7 @@ std::string unzip_new(std::string _in_zip_file, std::string _target_zip, std::st
p = mz_zip_reader_extract_file_to_heap(&zip_archive, archive_filename, &uncomp_size, 0);
if (!p)
{
printf("mz_zip_reader_extract_file_to_heap() failed!\n");
printf("mz_zip_reader_extract_file_to_heap() failed on file %s\n", archive_filename);
mz_zip_reader_end(&zip_archive);
return ret;
}