diff --git a/assets/js/main.js b/assets/js/main.js index eccbe68..46068d6 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -645,7 +645,7 @@ document.addEventListener('DOMContentLoaded', () => { chatForm?.addEventListener('submit', (e) => { e.preventDefault(); const content = chatInput.value.trim(); - const file = fileUpload.files[0]; + const file = fileUpload?.files?.[0]; if (!content && !file) return; chatInput.value = ''; @@ -665,7 +665,7 @@ document.addEventListener('DOMContentLoaded', () => { if (file) { formData.append('file', file); - fileUpload.value = ''; // Clear file input + if (fileUpload) fileUpload.value = ''; // Clear file input // Show progress bar progressContainer.style.display = 'block'; diff --git a/index.php b/index.php index 441d9f0..4877902 100644 --- a/index.php +++ b/index.php @@ -1599,8 +1599,6 @@ $projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? ''; -
-