From e5d94d9a538ed13548aeee95339b75507bc20e45 Mon Sep 17 00:00:00 2001 From: Chen Tao <70054568+eeee0717@users.noreply.github.com> Date: Fri, 4 Jul 2025 17:47:52 +0800 Subject: [PATCH] fix(MinerU): remove check quota (#7804) fix: remove check quota --- src/main/preprocess/MineruPreprocessProvider.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/main/preprocess/MineruPreprocessProvider.ts b/src/main/preprocess/MineruPreprocessProvider.ts index a0a9c65417..58c0c00c23 100644 --- a/src/main/preprocess/MineruPreprocessProvider.ts +++ b/src/main/preprocess/MineruPreprocessProvider.ts @@ -111,7 +111,6 @@ export default class MineruPreprocessProvider extends BasePreprocessProvider { } private async validateFile(filePath: string): Promise { - const quota = await this.checkQuota() const pdfBuffer = await fs.promises.readFile(filePath) const doc = await this.readPdf(new Uint8Array(pdfBuffer)) @@ -125,10 +124,6 @@ export default class MineruPreprocessProvider extends BasePreprocessProvider { const fileSizeMB = Math.round(pdfBuffer.length / (1024 * 1024)) throw new Error(`PDF file size (${fileSizeMB}MB) exceeds the limit of 200MB`) } - // 检查配额 - if (quota <= 0 || quota - doc.numPages <= 0) { - throw new Error('MinerU解析配额不足,请申请企业账户或自行部署,剩余额度:' + quota) - } } private createProcessedFileInfo(file: FileMetadata, outputPath: string): FileMetadata {