From ae32f43ffa03f7a56b3cad517c74e6467cee7d40 Mon Sep 17 00:00:00 2001 From: Richard Girges <richardgirges@gmail.com> Date: Thu, 25 Aug 2016 15:47:51 -0700 Subject: [PATCH] Update to README about options and limitations --- README.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6356e30..3c666fc 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,19 @@ Install npm install express-fileupload +Important Note +============== +Add `app.use(fileUpload())` AFTER `app.use(bodyParser.json)` and any other bodyParser middlewares! This limitation will be explored and resolved in an upcoming release. + +Options +======= +Pass in Busboy options directly to express-fileupload (using Busboy `v0.2.13`). Check out the Busboy documentation here: https://github.com/mscdex/busboy#api +```javascript +app.use(fileUpload({ + limits: { fileSize: 50 * 1024 * 1024 }, +})); +``` + Example ======= @@ -60,4 +73,4 @@ app.post('/upload', function(req, res) { ## Thanks & Credit -* [Brian White](https://github.com/mscdex) for his stellar work on the [Busboy Package](https://github.com/mscdex/busboy) and the [connect-busboy Package](https://github.com/mscdex/connect-busboy) \ No newline at end of file +* [Brian White](https://github.com/mscdex) for his stellar work on the [Busboy Package](https://github.com/mscdex/busboy) and the [connect-busboy Package](https://github.com/mscdex/connect-busboy)