Окно обновления: форма уходит как обычная (urlencoded), сервер разбирает и multipart — «Обновить» у строки снова обновляет только её

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014FsEKyJrYF69Cj9ZXzFLRi
This commit is contained in:
zuevav
2026-09-24 22:28:49 +03:00
parent 56643cbe56
commit c45d8632ca
2 changed files with 8 additions and 2 deletions
+5 -1
View File
@@ -1401,7 +1401,11 @@ func (h *setupHandlers) applyUpdate(w http.ResponseWriter, r *http.Request) {
http.Error(w, "method", http.StatusMethodNotAllowed)
return
}
_ = r.ParseForm()
// форма может прийти и как multipart (окно обновления) — иначе имена компонентов теряются
// и «Обновить» у одной строки превращается в «Обновить всё»
if err := r.ParseMultipartForm(1 << 20); err != nil {
_ = r.ParseForm()
}
names := r.Form["component"]
rc := h.rc
save := func(msg string, err error) string {