vee-formidable1.0.12 • Public • Published
This is a simple ExpressJS middleware which wraps 'formidable'
It is written in TypeScript, declaration file is available by default.
This package exports a single object with a single field
makeMiddleware containing a function described bellow.
Accepts one optional argument of type
FormidableOptions, which is
Object.assigned to the wrapped
formidable.IncommingForm. See formidable API for an up-to-date reference about available options.
After applying this middleware, you can utilize
req.fields as an object, with each key being the name of the form input and its corresponding value containing input's data, which is of type
string | string.
All files sent by the form are stored in a directory specified as
uploadDir option, which is
os.tmpdir() by default.
Information about forwarded files is available at
It is an object mapping input's names to
formidable.File | formidable.File (see
'@types/formidable' declaration file for precise info).
const express = ;const formParser = ;const app = ;app;app;
This middleware is a problem fixed and rewritten to TypeScript 'express-formidable' npm package.
Type declaration file is based on '@types/express-formidable' npm package.