fix: 修复仅阅读没有正确传递base64的问题
This commit is contained in:
parent
bfe00cc98f
commit
abebd5d62f
12
js/app.js
12
js/app.js
|
|
@ -2241,9 +2241,19 @@ async function handleReadClick() {
|
||||||
batchTotal: null,
|
batchTotal: null,
|
||||||
batchTemplate: null,
|
batchTemplate: null,
|
||||||
batchFormats: null,
|
batchFormats: null,
|
||||||
batchStartedAt: null
|
batchStartedAt: null,
|
||||||
|
// 对于 PDF 文件,将 base64 也存入 metadata.originalPdfBase64
|
||||||
|
// 以便历史详情页面能够正确显示PDF
|
||||||
|
metadata: fileType === 'pdf' ? { originalPdfBase64: base64Content } : null
|
||||||
};
|
};
|
||||||
|
|
||||||
|
console.log('[仅阅读] 保存记录:', {
|
||||||
|
id: recordId,
|
||||||
|
fileType,
|
||||||
|
hasMetadata: !!record.metadata,
|
||||||
|
hasOriginalPdfBase64: !!(record.metadata && record.metadata.originalPdfBase64)
|
||||||
|
});
|
||||||
|
|
||||||
// 保存到数据库
|
// 保存到数据库
|
||||||
if (typeof window.storageAdapter !== 'undefined' && typeof window.storageAdapter.saveResultToDB === 'function') {
|
if (typeof window.storageAdapter !== 'undefined' && typeof window.storageAdapter.saveResultToDB === 'function') {
|
||||||
await window.storageAdapter.saveResultToDB(record);
|
await window.storageAdapter.saveResultToDB(record);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue