Add early return guard for undefined uploadFile before accessing .size
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -69,6 +69,7 @@ async function upload(event) {
|
||||
if (target && target.files) {
|
||||
uploadFile = target.files[0];
|
||||
}
|
||||
if (!uploadFile) return;
|
||||
// File size must not exceed 90 MB (90*1024*1024 = 94,371,840 bytes)
|
||||
if (uploadFile.size >= 94371840) {
|
||||
fileInput.value = "";
|
||||
|
||||
Reference in New Issue
Block a user