尝试新增api 优化导出

This commit is contained in:
xuncha authored and xuncha committed 2026-02-05 18:33:29 +08:00
1 parent 2d573896f9
commit ff2f6799c8
9 files changed
+943 -7

No files matched your search

+3 -1
View File
@@ -2237,7 +2237,9 @@ class ChatService {
}
// 检查是否是 base64 编码
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, raw)