Compare commits

...

1 commit
v0.3.3 ... main

Author SHA1 Message Date
9962a6932d added export gpx 2026-08-03 20:14:22 +01:00
3 changed files with 14 additions and 2 deletions

2
Cargo.lock generated
View file

@ -1590,7 +1590,7 @@ dependencies = [
[[package]]
name = "rs_maps"
version = "0.3.3"
version = "0.3.4"
dependencies = [
"anyhow",
"argon2",

View file

@ -1,7 +1,7 @@
# Cargo.toml
[package]
name = "rs_maps"
version = "0.3.3"
version = "0.3.4"
edition = "2021"
[dependencies]

View file

@ -1110,6 +1110,18 @@ async function loadGpxList() {
edit.addEventListener('click', () => editRoute(f.name));
li.appendChild(edit);
// A plain anchor rather than a fetch-and-blob: same-origin navigation
// carries the session cookie, and the browser handles the save dialog,
// resumability and large files without any of it passing through JS.
const download = document.createElement('a');
download.className = 'link';
download.textContent = 'Download';
download.href = 'api/gpx/file/' + encodeURIComponent(f.name);
// Without an explicit filename the browser would name it after the URL's
// last segment, which is percent-encoded.
download.download = f.name;
li.appendChild(download);
list.appendChild(li);
});
}