From 63e1b52e1b76e136e6534949980d85ffe413f0c9 Mon Sep 17 00:00:00 2001 From: Karan Jayachandra Date: Fri, 25 Jul 2025 16:06:20 +0200 Subject: Working mobile and desktop version --- app/static/file.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 app/static/file.js (limited to 'app/static/file.js') diff --git a/app/static/file.js b/app/static/file.js new file mode 100644 index 0000000..403ddf6 --- /dev/null +++ b/app/static/file.js @@ -0,0 +1,11 @@ +window.onload = function() { + const fileInput = document.querySelector("#file-js input[type=file]"); + if (fileInput !== null) { + fileInput.onchange = () => { + if (fileInput.files.length > 0) { + const fileName = document.querySelector("#file-js .file-name"); + fileName.textContent = fileInput.files[0].name; + } + } + }; +} \ No newline at end of file -- cgit v1.3.1