Trevixal API
    Preparing search index...

    Interface AttachmentOptions

    interface AttachmentOptions {
        accept?: readonly string[];
        bindDrop?: boolean;
        deleteOnRemove?: boolean;
        maxBytes?: number;
        onError?: (message: string) => void;
        onUpload?: (status: AttachmentUploadStatus) => void;
        storage: FileStorage;
    }
    Index
    accept?: readonly string[]

    Accepted files: MIME types (application/pdf), wildcards (text/*) or extensions (.zip). Defaults to everything that is not an image, images belong to @trevixal/extension-image, which claims them on drop first.

    bindDrop?: boolean

    Upload files dropped onto the editor. Defaults to true.

    deleteOnRemove?: boolean

    Delete the stored object when its attachment leaves the document.

    maxBytes?: number

    Bytes; defaults to 25 MB.

    onError?: (message: string) => void

    Surfaced to the user when a file is rejected or an upload fails.

    onUpload?: (status: AttachmentUploadStatus) => void

    Upload lifecycle for progress UI; called on every state change.

    storage: FileStorage

    Where the bytes go. Any FileStorage implementation.