Skip to content

Commit

Permalink
reformatting markdown in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
richardgirges committed Jan 13, 2017
1 parent e16ac55 commit 35c34e0
Showing 1 changed file with 11 additions and 16 deletions.
27 changes: 11 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,26 @@
express-fileupload
===========
# express-fileupload
Simple express file upload middleware that wraps around [connect-busboy](https://github.com/mscdex/connect-busboy).

## Install
```bash
npm install express-fileupload
```

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.
## 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
=======
## Example

### JavaScript
### Node.js:

```javascript
var express = require('express');
Expand Down Expand Up @@ -55,7 +50,7 @@ app.post('/upload', function(req, res) {
});
```

### Form
### HTML Form:
```html
<html>
<body>
Expand Down

0 comments on commit 35c34e0

Please sign in to comment.