WARNING: You should almost never use this value as-is (especially if you are using preservePath: true in your config) as it could contain malicious input. info contains the following properties:įilename - string - If supplied, this contains the file's filename. base64 to raw binary) are done on the file's data. stream is a Readable stream containing the file's data. (Special) Parser stream eventsįile(name, stream, info) - Emitted for each new file found. For example, if the Content-Type in headers is missing entirely, is not a supported type, or is missing the boundary for 'multipart/form-data' requests. This function can throw exceptions if there is something wrong with the values in config. Default: 2000 (same as node's http module). HeaderPairs - integer - For multipart forms, the max number of header key-value pairs to parse. Parts - integer - For multipart forms, the max number of parts (fields + files). Default: Infinity.įiles - integer - For multipart forms, the max number of file fields. Default: Infinity.įileSize - integer - For multipart forms, the max file size (in bytes). Default: 1048576 (1MB).įields - integer - Max number of non-file fields. Default: 100.įieldSize - integer - Max field value size (in bytes). Valid properties are:įieldNameSize - integer - Max field name size (in bytes). Limits - object - Various limits on incoming data. PreservePath - boolean - If paths in filenames from file parts in a 'multipart/form-data' request shall be preserved. Default: node's stream.Readable default.ĭefCharset - string - Default character set to use when one isn't defined. Default: node's stream.Writable default.įileHwm - integer - highWaterMark to use for individual file streams. HighWaterMark - integer - highWaterMark to use for the parser stream. Headers - object - These are the HTTP headers of the incoming request, which are used by individual parsers. ( function )(config) - Creates and returns a new Writable form parser stream. createServer ( ( req, res ) => ) API Exports Const http = require ( 'http' ) const busboy = require ( 'busboy' ) http.
0 Comments
Leave a Reply. |