You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A node.js module for parsing form data, especially file uploads.
7
+
A Node.js module for parsing form data, especially file uploads.
8
8
9
9
## Current status
10
10
11
+
**Maintainers Wanted:** Please see https://github.com/felixge/node-formidable/issues/412
12
+
11
13
This module was developed for [Transloadit](http://transloadit.com/), a service focused on uploading
12
14
and encoding images and videos. It has been battle-tested against hundreds of GB of file uploads from
13
15
a large variety of clients and is considered production-ready.
@@ -22,19 +24,12 @@ a large variety of clients and is considered production-ready.
22
24
23
25
## Installation
24
26
25
-
This is a low level package, and if you're using a high level framework such as Express, chances are it's already included in it. You can [read this discussion](http://stackoverflow.com/questions/11295554/how-to-disable-express-bodyparser-for-file-uploads-node-js) about how Formidable is integrated with Express.
This is a low-level package, and if you're using a high-level framework it may already be included. However, [Express v4](http://expressjs.com) does not include any multipart handling, nor does [body-parser](https://github.com/expressjs/body-parser).
32
+
38
33
Note: Formidable requires [gently](http://github.com/felixge/node-gently) to run the unit tests, but you won't need it for just using the library.
39
34
40
35
## Example
@@ -87,7 +82,7 @@ Sets encoding for incoming form fields.
87
82
form.uploadDir="/my/dir";
88
83
```
89
84
Sets the directory for placing file uploads in. You can move them later on using
90
-
`fs.rename()`. The default is `os.tmpDir()`.
85
+
`fs.rename()`. The default is `os.tmpdir()`.
91
86
92
87
```javascript
93
88
form.keepExtensions=false;
@@ -204,35 +199,40 @@ If hash calculation was set, you can read the hex digest out of this var.
204
199
205
200
206
201
#### 'progress'
202
+
203
+
Emitted after each incoming chunk of data that has been parsed. Can be used to roll your own progress bar.
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.
244
+
244
245
```javascript
245
246
form.on('error', function(err) {
246
247
});
@@ -266,7 +267,18 @@ Emitted when the entire request has been received, and all contained files have
266
267
267
268
## Changelog
268
269
269
-
### v1.0.14
270
+
### v1.1.1 (2017-01-15)
271
+
272
+
* Fix DeprecationWarning about os.tmpDir() (Christian)
273
+
* Update `buffer.write` order of arguments for Node 7 (Kornel Lesiński)
274
+
* JSON Parser emits error events to the IncomingForm (alessio.montagnani)
0 commit comments