优化http文件上传相关代码 (#4796)

This commit is contained in:
YuLi
2026-08-01 22:04:57 -07:00
committed by GitHub
parent 79d795a767
commit 006eece147
3 changed files with 10 additions and 4 deletions

View File

@@ -226,6 +226,8 @@ static std::map<std::string, HttpBodyHandler, StrCaseCompare> s_map_file_handler
* Register a handler for a URL path. When a PUT/POST request arrives at that path,
* the handler is invoked to create an HttpBody (e.g. HttpFileStorage) that receives
* the request body stream directly. CHECK_SECRET() can be used inside the handler.
* File publication policy belongs to the registered application: use a temporary
* storage path here and move it to the public path in the corresponding API handler.
*
* @param url_path the HTTP URL path to match
* @param handler callback that sets body; may throw AuthException to reject