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. 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.įile(name, stream, info) - Emitted for each new file found. 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). * **files** - _integer_ - For multipart forms, the max number of file fields. * **fileSize** - _integer_ - For multipart forms, the max file size (in bytes). * **fields** - _integer_ - Max number of non-file fields. * **fieldSize** - _integer_ - Max field value size (in bytes). * **fieldNameSize** - _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. * **defCharset** - _string_ - Default character set to use when one isn't defined. **Default:** node's _stream.Readable_ default. * **fileHwm** - _integer_ - highWaterMark to use for individual file streams. **Default:** node's _stream.Writable_ default. * **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 Each property value is an array of one or more string values.Const http = require ( 'http' ), const busboy = require ( 'busboy' ) http.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |