Beignet API reference
    Preparing search index...

    Options for creating an S3-compatible direct upload signer.

    interface S3UploadSignerOptions {
        bucket: string;
        client?: S3StorageClient;
        clientConfig?: Omit<
            S3ClientConfig,
            "region"
            | "endpoint"
            | "credentials"
            | "forcePathStyle",
        >;
        credentials?: {
            accessKeyId: string;
            secretAccessKey: string;
            sessionToken?: string;
        };
        endpoint?: string;
        expiresInSeconds?: number;
        forcePathStyle?: boolean;
        instrumentation?: ProviderInstrumentationTarget;
        keyPrefix?: string;
        now?: () => Date;
        publicBaseUrl?: string;
        region?: string;
        signUrl?: (
            args: {
                client: S3StorageClient;
                command: PutObjectCommand;
                expiresInSeconds: number;
            },
        ) => string
        | Promise<string>;
    }

    Hierarchy (View Summary)

    Index

    Properties

    bucket: string

    S3 bucket name.

    S3-compatible client. Omit to create an AWS SDK S3Client from config.

    clientConfig?: Omit<
        S3ClientConfig,
        "region"
        | "endpoint"
        | "credentials"
        | "forcePathStyle",
    >

    Additional AWS SDK S3Client config.

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

    Static credentials used when creating the default S3Client.

    endpoint?: string

    S3-compatible endpoint. Required for R2, MinIO, Spaces, B2, and most non-AWS object stores.

    expiresInSeconds?: number

    Number of seconds before generated direct upload URLs expire.

    900
    
    forcePathStyle?: boolean

    Use path-style bucket addressing when required by the object store.

    Optional instrumentation target. The provider passes existing app ports automatically; direct factory users can pass an instrumentation port.

    keyPrefix?: string

    Prefix all object keys before sending them to S3.

    now?: () => Date

    Clock used for deterministic tests.

    publicBaseUrl?: string

    Base URL used by publicUrl(...) for public objects.

    region?: string

    Region used when creating the default S3Client.

    "us-east-1"
    
    signUrl?: (
        args: {
            client: S3StorageClient;
            command: PutObjectCommand;
            expiresInSeconds: number;
        },
    ) => string
    | Promise<string>

    Test hook for replacing AWS SDK signing.