Skip to content

ClipboardManager.saveAttachment method

ClipboardManager › saveAttachment

Unofficial

Save an attachment of specified name and extension to the vault.

Signature:

saveAttachment(name: string, extension: string, data: ArrayBuffer, replace: boolean): Promise<void>

Parameters:

Parameter Type Description
name string Attachment file name.
extension string File extension.
data ArrayBuffer Binary data of the attachment.
replace boolean Whether to replace the current selection.

Returns: Promise<void>A promise that resolves when the attachment is saved.

Remarks:

Invokes insertAttachmentEmbed.