Kiri API reference
    Preparing search index...

    Interface UploadOptions

    Options for upload() — everything export() takes, plus these.

    interface UploadOptions {
        type?: ExportType;
        format?: ExportFormat;
        quality?: number;
        width?: number;
        height?: number;
        fieldName?: string;
        fileName?: string;
        extraFields?: Record<string, string>;
        fetchOptions?: RequestInit;
        uploader?: Uploader;
    }

    Hierarchy (View Summary)

    Index
    type?: ExportType

    Default "base64" (a data URL string).

    format?: ExportFormat

    Default "image/png". A circle frame exported as "image/jpeg" warns — JPEG has no alpha channel.

    quality?: number

    0-1. Only meaningful for "image/jpeg"/"image/webp". Default: browser default.

    width?: number

    Output pixel width. Default: the frame's width.

    height?: number

    Output pixel height. Default: the frame's height.

    fieldName?: string

    The FormData field name. Default "file".

    fileName?: string

    Default: "crop.<ext>", extension derived from format.

    extraFields?: Record<string, string>

    Extra FormData fields to send alongside the file. Default {}.

    fetchOptions?: RequestInit

    Merged into the underlying fetch() call (method/body are always overridden). Default {}.

    uploader?: Uploader

    Overrides the constructor's uploader for this call only.