Documentation
    Preparing search index...

    Interface UploadRequest

    A napplet's upload request. data crosses the postMessage boundary by structured clone — shells never require base64 encoding.

    interface UploadRequest {
        caption?: string;
        data: Blob | ArrayBuffer;
        filename?: string;
        metadata?: Record<string, unknown>;
        mimeType?: string;
        noTransform?: boolean;
        rail?: UploadRail;
    }
    Index

    Properties

    caption?: string

    Alt text / description for the file event.

    data: Blob | ArrayBuffer

    The bytes to upload.

    filename?: string

    Suggested filename.

    metadata?: Record<string, unknown>

    Rail-specific or shell-specific extra metadata.

    mimeType?: string

    MIME type; inferred from data when omitted.

    noTransform?: boolean

    Request the server not re-encode the file (NIP-96 no_transform).

    rail?: UploadRail

    Storage rail; omit to let the shell pick a configured default.