Skip to content

Commit b7ef166

Browse files
committed
Merge pull request #327 from gabeio/patch-2
fixed incorrect documentation header/paragraph
2 parents 3f32e64 + 5aac3f7 commit b7ef166

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

Readme.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -204,35 +204,40 @@ If hash calculation was set, you can read the hex digest out of this var.
204204

205205

206206
#### 'progress'
207+
208+
Emitted after each incoming chunk of data that has been parsed. Can be used to roll your own progress bar.
209+
207210
```javascript
208211
form.on('progress', function(bytesReceived, bytesExpected) {
209212
});
210213
```
211-
Emitted after each incoming chunk of data that has been parsed. Can be used to roll your own progress bar.
212214

213215

214216

215217
#### 'field'
218+
219+
Emitted whenever a field / value pair has been received.
220+
216221
```javascript
217222
form.on('field', function(name, value) {
218223
});
219224
```
220225

221226
#### 'fileBegin'
222227

223-
Emitted whenever a field / value pair has been received.
228+
Emitted whenever a new file is detected in the upload stream. Use this even if
229+
you want to stream the file to somewhere else while buffering the upload on
230+
the file system.
231+
224232
```javascript
225233
form.on('fileBegin', function(name, file) {
226234
});
227235
```
228236

229237
#### 'file'
230238

231-
Emitted whenever a new file is detected in the upload stream. Use this even if
232-
you want to stream the file to somewhere else while buffering the upload on
233-
the file system.
234-
235239
Emitted whenever a field / file pair has been received. `file` is an instance of `File`.
240+
236241
```javascript
237242
form.on('file', function(name, file) {
238243
});
@@ -241,6 +246,7 @@ form.on('file', function(name, file) {
241246
#### 'error'
242247

243248
Emitted when there is an error processing the incoming form. A request that experiences an error is automatically paused, you will have to manually call `request.resume()` if you want the request to continue firing `'data'` events.
249+
244250
```javascript
245251
form.on('error', function(err) {
246252
});

0 commit comments

Comments
 (0)