# Installation
> `npm install --save @types/express-formidable`

# Summary
This package contains type definitions for express-formidable (https://github.com/noraesae/express-formidable).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express-formidable.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express-formidable/index.d.ts)
````ts
import express = require("express");
import { EventNames, Fields, Files } from "formidable";

// Extend the express request object with attached formidable files and fields
declare global {
    namespace Express {
        interface Request {
            fields?: Fields;
            files?: Files;
        }
    }
}

interface ExpressFormidableOptions {
    encoding?: string;
    uploadDir?: string;
    keepExtensions?: boolean;
    type?: "multipart" | "urlencoded";
    maxFileSize?: number;
    maxFieldsSize?: number;
    maxFields?: number;
    hash?: boolean | "sha1" | "md5";
    multiples?: boolean;
}

interface ExpressFormidableEvents {
    event: EventNames;
    action: (
        req: express.Request,
        res: express.Response,
        next: express.NextFunction,
        ...formidableParameters: any[]
    ) => void;
}

declare function ExpressFormidable(
    options?: ExpressFormidableOptions,
    events?: ExpressFormidableEvents[],
): express.RequestHandler;

declare namespace ExpressFormidable {}

export = ExpressFormidable;

````

### Additional Details
 * Last updated: Fri, 24 Oct 2025 04:02:41 GMT
 * Dependencies: [@types/express](https://npmjs.com/package/@types/express), [@types/formidable](https://npmjs.com/package/@types/formidable)

# Credits
These definitions were written by [Torkild Dyvik Olsen](https://github.com/tdolsen), and [Evan Shortiss](https://github.com/evanshortiss).
