diff options
| author | Karan Jayachandra <karan.jayachandra@nxp.com> | 2025-07-25 16:06:20 +0200 |
|---|---|---|
| committer | Karan Jayachandra <karan.jayachandra@nxp.com> | 2025-07-25 16:06:20 +0200 |
| commit | 63e1b52e1b76e136e6534949980d85ffe413f0c9 (patch) | |
| tree | a4f8e5745ad11be7e2f79740f3c590f4a67224a4 /app/static/file.js | |
| parent | c041e74af8c69e8fb0680558e23dd7be542afcf6 (diff) | |
Working mobile and desktop version
Diffstat (limited to 'app/static/file.js')
| -rw-r--r-- | app/static/file.js | 11 |
1 files changed, 11 insertions, 0 deletions
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 |
