Skip to content

Commit ae112ef

Browse files
uncommented
1 parent cafb224 commit ae112ef

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/app/upload/page.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const Page = () => {
4747

4848
const handlePrint = async () => {
4949
const maxFileSize = 5 * 1024 * 1024;
50-
// const allowedFileTypes = ["application/pdf", "image/jpeg", "image/png", "image/gif"];
50+
const allowedFileTypes = ["application/pdf", "image/jpeg", "image/png", "image/gif"];
5151
const files = fileInputRef.current?.files as FileList | null;
5252

5353
if (!files || files.length === 0) {
@@ -64,10 +64,10 @@ const Page = () => {
6464
return;
6565
}
6666

67-
// if (!allowedFileTypes.includes(file.type)) {
68-
// toast.error(`File type of ${file.name} is not allowed. Only PDFs and images are accepted.`);
69-
// return;
70-
// }
67+
if (!allowedFileTypes.includes(file.type)) {
68+
toast.error(`File type of ${file.name} is not allowed. Only PDFs and images are accepted.`);
69+
return;
70+
}
7171
}
7272

7373
const formData = new FormData();

0 commit comments

Comments
 (0)