Skip to content

Commit 8e0a569

Browse files
committed
Updated readme with custom options example
1 parent d1d6f4a commit 8e0a569

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

Readme.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,20 @@ form.submit('http://example.org/', function(err, res) {
7575

7676
For more advanced request manipulations ```submit()``` method returns ```http.ClientRequest``` object, or you can choose from one of the alternative submission methods.
7777

78+
### Custom options
79+
80+
You can provide custom options, such as `maxDataSize`:
81+
82+
``` javascript
83+
var FormData = require('form-data');
84+
85+
var form = new FormData({ maxDataSize: 20971520 });
86+
form.append('my_field', 'my value');
87+
form.append('my_buffer', /* something big */);
88+
```
89+
90+
List of available options could be found in [combined-stream](https://github.com/felixge/node-combined-stream/blob/master/lib/combined_stream.js#L7-L15)
91+
7892
### Alternative submission methods
7993

8094
You can use node's http client interface:

0 commit comments

Comments
 (0)