From aa493a0b5132bea1c3d1845119a21f4e606a2a9d Mon Sep 17 00:00:00 2001 From: bruno Date: Thu, 25 Apr 2024 10:20:32 +0200 Subject: [PATCH] Add file upload --- assets/script.js | 2 +- pages/home/upload.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/script.js b/assets/script.js index 5a311dc..5d68ead 100644 --- a/assets/script.js +++ b/assets/script.js @@ -546,7 +546,7 @@ function uploadFile() { formData.append('userfile', file); let xhr = new XMLHttpRequest(); - xhr.open('POST', '__URL__', true); + xhr.open('POST', '/upload', true); xhr.onload = function () { if (xhr.status === 200) { diff --git a/pages/home/upload.html b/pages/home/upload.html index 9da0c16..fb0edfd 100644 --- a/pages/home/upload.html +++ b/pages/home/upload.html @@ -1,5 +1,5 @@ - +