diff --git a/src/FileServer.c b/src/FileServer.c index 0004c7d..e5bb28d 100644 --- a/src/FileServer.c +++ b/src/FileServer.c @@ -167,8 +167,9 @@ static esp_err_t http_resp_dir_html(httpd_req_t *req, const char *dirpath) continue; } sprintf(entrysize, "%ld", entry_stat.st_size); +#if FILE_SERVER_DEBUG_LEVEL > 0 ESP_LOGI(TAG, "Found %s : %s (%s bytes)", entrytype, entry->d_name, entrysize); - +#endif /* Send chunk of HTML file containing table entries with file name and size */ httpd_resp_sendstr_chunk(req, "uri); @@ -257,8 +258,9 @@ esp_err_t download_get_handler(httpd_req_t *req) httpd_resp_send_err(req, HTTPD_500_INTERNAL_SERVER_ERROR, "Failed to read existing file"); return ESP_FAIL; } - +#if FILE_SERVER_DEBUG_LEVEL > 0 ESP_LOGI(TAG, "Sending file : %s (%ld bytes)...", filename, file_stat.st_size); +#endif set_content_type_from_file(req, filename); /* Retrieve the pointer to scratch buffer for temporary storage */