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];
|
const file = document.getElementById('skinFile').files[0];
|
||||||
if (!file) return;
|
if (!file) return;
|
||||||
const fd = new FormData();
|
const fd = new FormData();
|
||||||
fd.append('file', file);
|
fd.append('skin', file);
|
||||||
const alert = document.getElementById('alertSkin');
|
const alert = document.getElementById('alertSkin');
|
||||||
try {
|
try {
|
||||||
const res = await fetch('/api/web/profile/skin', {
|
const res = await fetch('/api/web/profile/skin', {
|
||||||
@@ -169,7 +169,7 @@
|
|||||||
const file = document.getElementById('capeFile').files[0];
|
const file = document.getElementById('capeFile').files[0];
|
||||||
if (!file) return;
|
if (!file) return;
|
||||||
const fd = new FormData();
|
const fd = new FormData();
|
||||||
fd.append('file', file);
|
fd.append('cape', file);
|
||||||
const alert = document.getElementById('alertCape');
|
const alert = document.getElementById('alertCape');
|
||||||
try {
|
try {
|
||||||
const res = await fetch('/api/web/profile/cape', {
|
const res = await fetch('/api/web/profile/cape', {
|
||||||
|
|||||||
Reference in New Issue
Block a user