尝试新增api 优化导出

This commit is contained in:
xuncha
2026-02-05 17:46:51 +08:00
committed by xuncha
parent 2d573896f9
commit ff2f6799c8
9 changed files with 943 additions and 7 deletions

View File

@@ -110,7 +110,9 @@ class DualReportService {
const bytes = Buffer.from(raw, 'hex')
if (bytes.length > 0) return this.decodeBinaryContent(bytes)
}
if (this.looksLikeBase64(raw)) {
// 只有当字符串足够长超过16字符且看起来像 base64 时才尝试解码
// 短字符串(如 "test", "home" 等)容易被误判为 base64
if (raw.length > 16 && this.looksLikeBase64(raw)) {
try {
const bytes = Buffer.from(raw, 'base64')
return this.decodeBinaryContent(bytes)