function uploadAttachment
uploadAttachment(
data: Uint8Array,
filename: string,
): Promise<string>

Upload an attachment to Bunny storage. Encrypts the file bytes before uploading. Uses the provided filename (caller generates via generateAttachmentFilename). Returns the filename on success.

Parameters

filename: string

Return Type

Promise<string>

Usage

import { uploadAttachment } from "docs/embed.ts";