From efa4c9c3cd0be9732679c322cdae1431fb06316b Mon Sep 17 00:00:00 2001 From: Christian Krakau-Louis Date: Tue, 25 Mar 2025 22:05:10 +0100 Subject: [PATCH] Update frontend/upload.html Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- frontend/upload.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frontend/upload.html b/frontend/upload.html index 2f981202..d03e3bd0 100644 --- a/frontend/upload.html +++ b/frontend/upload.html @@ -90,6 +90,12 @@ } async function uploadFile(file) { + // Check file type + const acceptedTypes = ['application/pdf']; + if (!acceptedTypes.includes(file.type)) { + statusMessage.textContent = `Error: Only PDF files are accepted.`; + return; + } statusMessage.textContent = `Uploading ${file.name}...`; try { let formData = new FormData();