From 74ad023a36ec998a2e3f0b8cf06a3475cc7b952c Mon Sep 17 00:00:00 2001 From: Vladimir Zagainov Date: Thu, 4 Jun 2026 18:33:05 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20align=20form=20field=20names=20in=20skin?= =?UTF-8?q?/cape=20upload=20(file=20=E2=86=92=20skin/cape)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit JS sent fd.append('file', ...) but Go expected r.FormFile("skin") / r.FormFile("cape"). --- internal/templates/html/profile.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/templates/html/profile.html b/internal/templates/html/profile.html index 6321fa2..1cd1ca8 100644 --- a/internal/templates/html/profile.html +++ b/internal/templates/html/profile.html @@ -140,7 +140,7 @@ const file = document.getElementById('skinFile').files[0]; if (!file) return; const fd = new FormData(); - fd.append('file', file); + fd.append('skin', file); const alert = document.getElementById('alertSkin'); try { const res = await fetch('/api/web/profile/skin', { @@ -169,7 +169,7 @@ const file = document.getElementById('capeFile').files[0]; if (!file) return; const fd = new FormData(); - fd.append('file', file); + fd.append('cape', file); const alert = document.getElementById('alertCape'); try { const res = await fetch('/api/web/profile/cape', {