mirror of
https://github.com/hicccc77/WeFlow.git
synced 2026-03-25 07:16:51 +00:00
修复路径错误
This commit is contained in:
@@ -5639,6 +5639,12 @@ class ChatService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 3. 读取解密后的文件并转成 base64
|
// 3. 读取解密后的文件并转成 base64
|
||||||
|
// 如果已经是 data URL,直接返回 base64 部分
|
||||||
|
if (result.localPath.startsWith('data:')) {
|
||||||
|
const base64Data = result.localPath.split(',')[1]
|
||||||
|
return { success: true, data: base64Data }
|
||||||
|
}
|
||||||
|
|
||||||
// localPath 是 file:// URL,需要转换成文件路径
|
// localPath 是 file:// URL,需要转换成文件路径
|
||||||
const filePath = result.localPath.startsWith('file://')
|
const filePath = result.localPath.startsWith('file://')
|
||||||
? result.localPath.replace(/^file:\/\//, '')
|
? result.localPath.replace(/^file:\/\//, '')
|
||||||
|
|||||||
Reference in New Issue
Block a user