/** A file received by the server (server-side upload mode). */ export interface IncomingFile { buffer: Buffer; originalName: string; /** Client-provided content type — treated as a HINT only, never trusted for validation. */ mimeType: string; size: number; fieldName?: string; } /** The result of persisting a file to storage. */ export interface StoredObject { key: string; /** Resolved URL. `null` under urlMode:'signed' until explicitly resolved. */ url: string | null; size: number; /** Final (detected) content type. */ mime: string; originalName: string; bucket?: string; } /** A presigned direct-to-storage upload instruction handed to the client. */ export interface PresignedUpload { uploadUrl: string; key: string; method: 'PUT'; headers: Record; /** ISO-8601 expiry. */ expiresAt: string; }