Update frontend/upload.html
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
f50177bfbf
commit
efa4c9c3cd
@@ -90,6 +90,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function uploadFile(file) {
|
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}...`;
|
statusMessage.textContent = `Uploading ${file.name}...`;
|
||||||
try {
|
try {
|
||||||
let formData = new FormData();
|
let formData = new FormData();
|
||||||
|
|||||||
Reference in New Issue
Block a user