From 6711abb3394a8413af6400d0abd647c417eb5308 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 31 Mar 2026 16:42:25 -0400 Subject: [PATCH] fix: Save pendingFile ref before closeModal() nulls it closeModal() was setting pendingFile = null, then confirmSubmit() was trying to append the now-null pendingFile to FormData, causing 'No file uploaded' error on every submission. Fix: capture pendingFile into fileToSubmit before calling closeModal(). Co-Authored-By: Claude Haiku 4.5 --- public/index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/index.html b/public/index.html index f7da844..393dc02 100644 --- a/public/index.html +++ b/public/index.html @@ -1086,10 +1086,11 @@ async function confirmSubmit() { if (!pendingFile) return; + const fileToSubmit = pendingFile; // save ref before closeModal nulls it closeModal(); const formData = new FormData(); - formData.append('prproj', pendingFile); + formData.append('prproj', fileToSubmit); const progressEl = document.getElementById('upload-progress'); const statusEl = document.getElementById('upload-status');