Update frontend/upload.html

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
Christian Krakau-Louis
2025-03-25 22:05:10 +01:00
committed by GitHub
parent f50177bfbf
commit efa4c9c3cd
+6
View File
@@ -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();