/** * Storage Chunked Upload Configuration * * Configuration constants for multipart/chunked file uploads. * Used by adapters that support chunked uploads (R2, Supabase, S3). * * @module @plyaz/config/storage/chunked-upload */ /** * Chunk size configuration for multipart uploads * Based on S3/R2 limits: 5MB min, 5GB max per part, 10,000 parts max */ export declare const STORAGE_CHUNK_SIZE: { readonly MIN: number; readonly MAX: number; readonly DEFAULT_SMALL: number; readonly DEFAULT_MEDIUM: number; readonly DEFAULT_LARGE: number; readonly DEFAULT_HUGE: number; }; /** * File size thresholds for determining chunk strategy */ export declare const STORAGE_FILE_SIZE_THRESHOLDS: { readonly SMALL: number; readonly MEDIUM: 1073741824; readonly LARGE: number; readonly CHUNKED_UPLOAD: number; }; /** * Check if file should use chunked upload based on size * * @param file - File buffer or stream * @param threshold - Size threshold in bytes (defaults to 100MB) * @returns True if file should use chunked upload * * @example * ```typescript * const shouldChunk = shouldUseStorageChunkedUpload(fileBuffer); * const shouldChunkCustom = shouldUseStorageChunkedUpload(fileBuffer, 50 * 1024 * 1024); * ``` */ export declare function shouldUseStorageChunkedUpload(file: globalThis.Buffer | globalThis.NodeJS.ReadableStream | null | undefined, threshold?: number): boolean; /** * Get optimal chunk size based on file size * Follows S3/R2 limits: 5MB min, 5GB max per part, 10,000 parts max * * @param totalSize - Total file size in bytes * @returns Optimal chunk size in bytes * * @example * ```typescript * const chunkSize = getStorageOptimalChunkSize(50 * 1024 * 1024); // 50MB file * console.log(chunkSize); // 5242880 (5MB) * ``` */ export declare function getStorageOptimalChunkSize(totalSize: number): number; //# sourceMappingURL=chunked-upload.d.ts.map