refactor: 优化临时文件命名以提高一致性
All checks were successful
Build Server / Compile DLL (push) Successful in 3m56s
All checks were successful
Build Server / Compile DLL (push) Successful in 3m56s
- 优化临时文件命名后缀以提高一致性和通用性。
This commit is contained in:
@@ -65,7 +65,7 @@ export class WechatOCRClient {
|
||||
}
|
||||
|
||||
public async recognize(image: Buffer): Promise<string> {
|
||||
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 {
|
||||
|
||||
Reference in New Issue
Block a user