/**
 * File Upload Middleware
 * Simple file upload handling for Express
 */
import { Request, Response, NextFunction } from "express";
export interface FileUploadConfig {
    destination?: string;
    maxSize?: number;
    allowedTypes?: string[];
    fieldName?: string;
    multiple?: boolean;
    maxCount?: number;
}
/**
 * Create file upload middleware
 */
export declare function createFileUpload(config?: FileUploadConfig): (req: Request, res: Response, next: NextFunction) => Promise<void>;
/**
 * Parse form data middleware (for mixed file/data uploads)
 */
export declare function parseFormData(fields?: string[]): import("express").RequestHandler<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>>;
/**
 * Download file helper
 */
export declare function sendFile(filePath: string, filename?: string): (_req: Request, res: Response) => void;
/**
 * Express middleware to clean old temp files periodically
 */
export declare function createTempCleaner(tempDir?: string, maxAge?: number, // 24 hours
interval?: number): (_req: Request, _res: Response, next: NextFunction) => void;
declare global {
    namespace Express {
        interface Request {
            uploadedFile?: {
                originalName: string;
                filename: string;
                path: string;
                size: number;
                mimetype?: string;
                extension: string;
                hash?: string;
            };
            uploadedFiles?: Array<{
                originalName: string;
                filename: string;
                path: string;
                size: number;
                mimetype?: string;
                extension: string;
                hash?: string;
            }>;
        }
    }
}
declare const _default: {
    createFileUpload: typeof createFileUpload;
    parseFormData: typeof parseFormData;
    sendFile: typeof sendFile;
    createTempCleaner: typeof createTempCleaner;
};
export default _default;
//# sourceMappingURL=fileUpload.d.ts.map