From 7810b637c3d8b462a72f0390d0ea10c4c54493da Mon Sep 17 00:00:00 2001 From: whoswhip Date: Fri, 4 Dec 2026 14:50:37 -0500 Subject: [PATCH] fix: upload file button being disabled in certain cases if you upload something then go back to the home page using the browser back button it would still show it's being uploaded/disabled --- web/static/js/upload.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/web/static/js/upload.js b/web/static/js/upload.js index 50884f5..a7a7338 100644 --- a/web/static/js/upload.js +++ b/web/static/js/upload.js @@ -3,6 +3,8 @@ const uploadFileInput = document.getElementById("upload-file"), uploadFileButton = document.getElementById("upload-file-button"), uploadFileForm = document.getElementById("upload-file-form"); const maxFileSize = uploadFileInput.dataset.maxSize; +uploadFileButton.disabled = false; +uploadFileButton.classList.remove("loading"); uploadFileInput.addEventListener("change", () => { let file = uploadFileInput.files[0] if (file && file.size > maxFileSize) {