From c530b0e366cf56b8dfc3f2ab5546c5924cd88741 Mon Sep 17 00:00:00 2001 From: jprochazk <1665677+jprochazk@users.noreply.github.com> Date: Fri, 16 Jun 2023 11:10:56 +0200 Subject: [PATCH 1/2] set url search param --- web_viewer/index.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web_viewer/index.html b/web_viewer/index.html index d0dbf1e8d690..1ae0e5a02790 100644 --- a/web_viewer/index.html +++ b/web_viewer/index.html @@ -367,7 +367,9 @@ const rrd_file = url_params.get('file') || 'colmap_fiat.rrd'; // Normalize the extra slashes from the url - return (data_path + rrd_file).replace(/\/{2,}/g, '/'); + const normalized = (data_path + rrd_file).replace(/\/{2,}/g, '/'); + window.location.search = new URLSearchParams({ url: normalized }).toString(); + return normalized; } function on_wasm_error(error) { From 1c89da9b237d869405bfda8214c186f789c3e89b Mon Sep 17 00:00:00 2001 From: jprochazk <1665677+jprochazk@users.noreply.github.com> Date: Fri, 16 Jun 2023 15:17:59 +0200 Subject: [PATCH 2/2] don't encode url param --- web_viewer/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_viewer/index.html b/web_viewer/index.html index 1ae0e5a02790..a578b5b98f9e 100644 --- a/web_viewer/index.html +++ b/web_viewer/index.html @@ -368,7 +368,7 @@ // Normalize the extra slashes from the url const normalized = (data_path + rrd_file).replace(/\/{2,}/g, '/'); - window.location.search = new URLSearchParams({ url: normalized }).toString(); + window.location.search = `?url=${normalized}`; return normalized; }