From fbc4fc195be0bd7237e5fb136a57b71b54301311 Mon Sep 17 00:00:00 2001 From: Mischa Date: Fri, 19 Jun 2026 15:33:13 +0200 Subject: [PATCH] fix: slice File to Blob before append so 3rd-arg filename is always used --- themes/intotheeast/templates/gpx-manager.html.twig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/themes/intotheeast/templates/gpx-manager.html.twig b/themes/intotheeast/templates/gpx-manager.html.twig index 9bf5135..cddba6c 100644 --- a/themes/intotheeast/templates/gpx-manager.html.twig +++ b/themes/intotheeast/templates/gpx-manager.html.twig @@ -138,8 +138,9 @@ function initUpload(formEl) { status.className = 'gpx-status'; btn.disabled = true; + const slugged = slugifyFilename(file.name); const fd = new FormData(); - fd.append('file', file, slugifyFilename(file.name)); + fd.append('file', file.slice(0, file.size, file.type), slugged); const res = await apiFetch(`${API}/pages${route}/media`, { method: 'POST', body: fd }); btn.disabled = false;