diff --git a/src/controllers/document.controller.ts b/src/controllers/document.controller.ts index 53db585..ee80272 100644 --- a/src/controllers/document.controller.ts +++ b/src/controllers/document.controller.ts @@ -39,7 +39,7 @@ export const uploadDocument = async (req: AuthenticatedRequest, res: Response) = } else { try { // 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) { console.error('officeParser Error:', err); return res.status(400).json({ error: 'Dosya formatı okunamadı veya desteklenmiyor.' });