From 597add6c1d3e5af313957ecd145b71d451b065a9 Mon Sep 17 00:00:00 2001 From: Mischa Date: Fri, 19 Jun 2026 15:13:00 +0200 Subject: [PATCH] fix: use fd.append 3rd arg to set slugified filename in multipart upload --- themes/intotheeast/templates/gpx-manager.html.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;