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 {