Skip to content

Commit

Permalink
UPDATED: README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-M1M3 committed Jul 7, 2022
1 parent 7532a81 commit 20d880f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
24 changes: 20 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,22 @@ async function requestHandler(req, res){
// other things
}
```
When we try to log body, we will get an object similar to this

```javascript
{
fields:{
name: <String>,
value: <String>,
info: <Object>
},
files:{
name: <String>,
content: <Buffer>,
info: <Object>
}
}
```

Notice, we pass in `req` as the first argument. The `req` we pass in must be an instance of
`IncomingMessage` from node `http` module or it can be an instance of `Request` constructor.
Expand All @@ -38,10 +54,10 @@ As, parter uses `busboy`, this is the same configuration object you would pass
in busboy. But, you can, of course pass additional properties.

```javascript
options.errorOnMoreFields = Boolean
options.errorOnMoreFiles = Boolean
options.errorOnMoreParts = Boolean
options.errorOnLargerFileSize = Boolean
options.errorOnMoreFields = <Boolean>
options.errorOnMoreFiles = <Boolean>
options.errorOnMoreParts = <Boolean>
options.errorOnLargerFileSize = <Boolean>
```
- `errorOnMoreFields`

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@obboy/parter",
"version": "1.0.0",
"version": "1.0.1",
"description": "Promise based multipart parser",
"main": "index.js",
"repository": {
Expand Down

0 comments on commit 20d880f

Please sign in to comment.