feat(core): attach a pdf (#10039)

Co-authored-by: L-Sun <zover.v@gmail.com>
This commit is contained in:
Oleg
2025-02-14 03:22:32 +01:00
committed by GitHub
parent 769547c2d5
commit b82fc3bc10
10 changed files with 82 additions and 12 deletions

View File

@@ -215,7 +215,8 @@ export async function addSiblingAttachmentBlocks(
files: File[],
maxFileSize: number,
targetModel: BlockModel,
place: 'before' | 'after' = 'after'
place: 'before' | 'after' = 'after',
isEmbed?: boolean
) {
if (!files.length) {
return;
@@ -245,6 +246,7 @@ export async function addSiblingAttachmentBlocks(
name: file.name,
size: file.size,
type: types[index],
embed: isEmbed,
}));
const blockIds = doc.addSiblingBlocks(