Skip to content

AttachmentData

Defined in: packages/builders/src/attachment.ts:5

Options for CreateAttachment: file name, alt-text description, the contents or a file path, and an optional root folder the path must stay inside.

optional description?: string

Defined in: packages/builders/src/attachment.ts:7


file: string | ArrayBuffer | Uint8Array<ArrayBufferLike> | Blob | Buffer<ArrayBufferLike>

Defined in: packages/builders/src/attachment.ts:8


name: string

Defined in: packages/builders/src/attachment.ts:6


optional root?: string

Defined in: packages/builders/src/attachment.ts:14

Folder a string file must stay inside (symlinks included). Set it whenever the path is not one you wrote yourself, e.g. from a command option: without it, any readable file on the machine can be uploaded.