fix: align form field names in skin/cape upload (file → skin/cape)
All checks were successful
CI / lint (push) Successful in 18s
CI / test (push) Successful in 20s
CI / build (push) Successful in 20s
CI / docker (push) Successful in 1m7s

JS sent fd.append('file', ...) but Go expected r.FormFile("skin") / r.FormFile("cape").
This commit is contained in:
2026-06-04 18:33:05 +03:00
parent c22c860ec5
commit 74ad023a36

View File

@@ -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', {