fix: use fd.append 3rd arg to set slugified filename in multipart upload

This commit is contained in:
2026-06-19 15:13:00 +02:00
parent 1c9a6711b3
commit 597add6c1d
@@ -139,7 +139,7 @@ function initUpload(formEl) {
btn.disabled = true;
const fd = new FormData();
fd.append('file', new File([file], slugifyFilename(file.name), { type: file.type }));
fd.append('file', file, slugifyFilename(file.name));
const res = await apiFetch(`${API}/pages${route}/media`, { method: 'POST', body: fd });
btn.disabled = false;