feat(web): upload routes write large bodies to a file

A route registered as an upload route has its headers run through the middleware
first, so a request that isn't allowed is answered before any of its body is taken.
The body then goes to a file as it arrives, with a size limit, instead of into
memory. MultipartFile splits a multipart/form-data body that is in a file into its
parts without loading it.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-11-10 18:25:53 -06:00
parent e714ff2f0a
commit 69476e6546
6 changed files with 481 additions and 60 deletions

View File

@@ -1,6 +1,7 @@
set(DWEB_SOURCES
"Web.cpp"
"DeferredReply.cpp")
"DeferredReply.cpp"
"MultipartFile.cpp")
add_library(dWeb STATIC ${DWEB_SOURCES})