From 9e48c2bd8b4a3fdd73b2fc51afec14180b4b0dcf Mon Sep 17 00:00:00 2001 From: Joris Date: Mon, 10 Jun 2024 08:55:25 +0200 Subject: Use easier path to facilitate matching on routes --- src/static/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/static') diff --git a/src/static/main.js b/src/static/main.js index 40e62d6..b3ed57b 100644 --- a/src/static/main.js +++ b/src/static/main.js @@ -28,10 +28,10 @@ window.onload = function() { // Wait a bit to prevent showing the loader too briefly setTimeout(function() { const xhr = new XMLHttpRequest() - xhr.open('POST', '/', true) + xhr.open('POST', '/upload', true) xhr.onload = function () { if (xhr.status === 200) { - window.location = `/${xhr.responseText}` + window.location = `/share/${xhr.responseText}` } else { showError(`Error uploading: ${xhr.status}`) } -- cgit v1.2.3