fix: knowledge encrypted (#9385)

This commit is contained in:
Chen Tao
2025-08-21 16:58:16 +08:00
committed by GitHub
parent 25d3b519d9
commit 1c0e29f029

View File

@@ -91,7 +91,7 @@ export default abstract class BasePreprocessProvider {
}
public async readPdf(buffer: Buffer) {
const pdfDoc = await PDFDocument.load(buffer)
const pdfDoc = await PDFDocument.load(buffer, { ignoreEncryption: true })
return {
numPages: pdfDoc.getPageCount()
}