/** * Fjall S3 storage configuration for Payload CMS. * * Wraps @payloadcms/storage-s3 with AWS Lambda-specific defaults: * - Uses MEDIA_BUCKET_NAME environment variable from Fjall infrastructure * - Enables/disables local storage based on environment * - Uses AWS_REGION for automatic region configuration */ import type { Plugin } from "payload"; /** * Options for the Fjall S3 storage plugin. */ export interface AwsS3StorageOptions { /** * Collection slugs to enable S3 storage for. * @default ['media'] */ collections?: string[]; /** * S3 key prefix for uploaded files. * @default 'media' */ prefix?: string; /** * Custom bucket name. If not provided, uses MEDIA_BUCKET_NAME env var. */ bucket?: string; /** * AWS region. If not provided, uses AWS_REGION env var. * @default 'us-east-1' */ region?: string; } /** * Create an S3 storage plugin configured for Fjall/AWS Lambda. * * This plugin is always registered so Payload includes S3 client components * in the importMap at build time. In local development (when MEDIA_BUCKET_NAME * is not set), uploads fall back to disk storage. * * @example * ```typescript * import { awsS3Storage } from '@fjall/payload' * * export const plugins: Plugin[] = [ * awsS3Storage(), * // other plugins... * ] * ``` */ export declare function awsS3Storage(options?: AwsS3StorageOptions): Plugin;