From 74eef045d8676a3738df9bbfc9b595fdb6d4ed95 Mon Sep 17 00:00:00 2001 From: bruno Date: Thu, 25 Apr 2024 10:21:53 +0200 Subject: [PATCH] Add file upload --- assets/script.js | 1 + pages/home/upload.html | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/script.js b/assets/script.js index 5d68ead..053196f 100644 --- a/assets/script.js +++ b/assets/script.js @@ -544,6 +544,7 @@ function uploadFile() { const file = fileInput.files[0]; let formData = new FormData(); formData.append('userfile', file); + formData.append('action', 'uploadFiles'); let xhr = new XMLHttpRequest(); xhr.open('POST', '/upload', true); diff --git a/pages/home/upload.html b/pages/home/upload.html index fb0edfd..eb718f1 100644 --- a/pages/home/upload.html +++ b/pages/home/upload.html @@ -2,7 +2,6 @@
-