mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-17 06:16:59 +08:00
feat(core): attach a pdf (#10039)
Co-authored-by: L-Sun <zover.v@gmail.com>
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user