Make Golang correctly delete temp files during uploading (#36128) (#36129)

Fix #36127

Partially backport #36128
And by the way partially backport  #36017
This commit is contained in:
wxiaoguang
2025-12-12 03:10:59 +08:00
committed by GitHub
parent e98d9bb93e
commit 3d66e75a47
7 changed files with 55 additions and 13 deletions

View File

@@ -55,7 +55,7 @@ func NewRouter() *Router {
// Use supports two middlewares
func (r *Router) Use(middlewares ...any) {
for _, m := range middlewares {
if m != nil {
if !isNilOrFuncNil(m) {
r.chiRouter.Use(toHandlerProvider(m))
}
}