Fix TypeScript error for officeparser

This commit is contained in:
mstfyldz
2026-08-08 17:22:39 +03:00
parent df70520ede
commit 633f66b09b
+1 -1
View File
@@ -39,7 +39,7 @@ export const uploadDocument = async (req: AuthenticatedRequest, res: Response) =
} else { } else {
try { try {
// officeParser natively supports pdf, docx, doc, rtf, txt, etc. // officeParser natively supports pdf, docx, doc, rtf, txt, etc.
extractedText = await officeParser.parseOffice(file.buffer); extractedText = (await officeParser.parseOffice(file.buffer)) as unknown as string;
} catch (err: any) { } catch (err: any) {
console.error('officeParser Error:', err); console.error('officeParser Error:', err);
return res.status(400).json({ error: 'Dosya formatı okunamadı veya desteklenmiyor.' }); return res.status(400).json({ error: 'Dosya formatı okunamadı veya desteklenmiyor.' });