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:

ParameterTypeDescription
namestringAttachment file name.
extensionstringFile extension.
dataArrayBufferBinary data of the attachment.
replacebooleanWhether to replace the current selection.

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

Remarks:

Invokes insertAttachmentEmbed.