Skip to content
Discussion options

You must be logged in to vote

根因链在 master(c291e7961)确认属实,且 bug 仍在(你的行号基本吻合,个别差几行,以 master 为准):

  • 粘贴入口只拿 File 快照:PASTE_COMMAND → clipboardData.itemsgetAsFile() → intakeFiles(ui-conversation/src/client/input/editor/keymap.ts:146-154)。
  • 图片是惰性持有:browserDraftAttachment 只存 File + objectURL 预览(service.ts:73-80),提交时才读字节;对比文件类附件是立即后台上传(:308-324,图片走 :310-314、文件走 :322)。
  • 提交路径:serializeAttachmentsencodeImagebase64ImageOfservice.ts:575-581:124-135,FileReader.readAsDataURL、onerror reject)→ 剪贴板同步使 File 失效 → NotFoundError → abandon():286-291)→ UI notify('error')(facade.ts:379/383)。

修复方向(与你的想法一致,更具体):在 browserDraftAttachment 入口就 await file.arrayBuffer() 把字节固化成 Blob 副本,previewUrl 指向副本——一次改动同时解决提交失败,还能顺带简化 probeDimensions:90-98

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by young1lin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants