diff --git a/themes/intotheeast/templates/gpx-manager.html.twig b/themes/intotheeast/templates/gpx-manager.html.twig index 3ed28d5..9bf5135 100644 --- a/themes/intotheeast/templates/gpx-manager.html.twig +++ b/themes/intotheeast/templates/gpx-manager.html.twig @@ -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;