From 79e1da12e8c6ca3956c4c61a44e40510104e68c4 Mon Sep 17 00:00:00 2001 From: imbytecat Date: Tue, 8 Jul 2025 01:21:49 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96=E4=B8=B4?= =?UTF-8?q?=E6=97=B6=E6=96=87=E4=BB=B6=E5=91=BD=E5=90=8D=E4=BB=A5=E6=8F=90?= =?UTF-8?q?=E9=AB=98=E4=B8=80=E8=87=B4=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 优化临时文件命名后缀以提高一致性和通用性。 --- src/wcocr.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wcocr.ts b/src/wcocr.ts index 662342d..a2207d1 100644 --- a/src/wcocr.ts +++ b/src/wcocr.ts @@ -65,7 +65,7 @@ export class WechatOCRClient { } public async recognize(image: Buffer): Promise { - const tempPath = join(tmpdir(), `wechat-ocr-temp-${randomBytes(16).toString('hex')}.png`) + const tempPath = join(tmpdir(), `wechat-ocr-${randomBytes(16).toString('hex')}.tmp`) await writeFile(tempPath, image) try {