fix: align form field names in skin/cape upload (file → skin/cape)
JS sent fd.append('file', ...) but Go expected r.FormFile("skin") / r.FormFile("cape").
This commit is contained in:
@@ -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', {
|
||||
|
||||
Reference in New Issue
Block a user