prorm API Reference
    Preparing search index...

    Interface R2StoreOptions

    Connection options for R2Store.

    interface R2StoreOptions {
        endpoint?: string;
        credentials?: {
            accessKeyId: string;
            secretAccessKey: string;
            sessionToken?: string;
        };
        region?: string;
        client?: R2ClientLike;
    }
    Index
    endpoint?: string

    The account-specific R2 S3 endpoint, e.g. https://<account_id>.r2.cloudflarestorage.com. Required unless a pre-built client is supplied.

    credentials?: {
        accessKeyId: string;
        secretAccessKey: string;
        sessionToken?: string;
    }

    R2 access-key credentials (created in the Cloudflare dashboard as an "R2 API Token"). Omit only when supplying a pre-built client.

    region?: string

    Region to advertise to the SDK. R2 has no regions and expects the sentinel value 'auto'; this defaults to 'auto' and rarely needs changing.

    client?: R2ClientLike

    A pre-built S3Client (or compatible object). When provided, connect() uses it directly and does NOT require the SDK — this is how tests inject a mock client, and how callers can supply a custom-configured client. When omitted, connect() builds a real S3Client pointed at R2 from the options above.