[web_server_idf] Skip multipart parser sources when OTA upload is disabled (#18534)

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
This commit is contained in:
J. Nick Koston
2026-08-23 23:45:26 +00:00
committed by GitHub
co-authored by Jesse Hills pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
parent 31afd94a30
commit c9e91be35f
@@ -2,6 +2,7 @@ from esphome.components.esp32 import (
add_idf_sdkconfig_option,
include_builtin_idf_component,
)
from esphome.config_helpers import filter_source_files_from_defines
import esphome.config_validation as cv
CODEOWNERS = ["@dentra"]
@@ -18,3 +19,10 @@ async def to_code(config):
# Re-enable esp-tls (excluded by default to save compile time);
# web_server_idf.cpp includes <esp_tls_crypto.h> for digest auth
include_builtin_idf_component("esp-tls")
# multipart.cpp is fully #ifdef'd on USE_WEBSERVER_OTA (set by the
# web_server OTA platform); skip it when OTA uploads are not configured.
FILTER_SOURCE_FILES = filter_source_files_from_defines(
{"multipart.cpp": "USE_WEBSERVER_OTA"}
)