Skip to content

Commit

Permalink
Merge remote-tracking branch 'christian-fei/master'
Browse files Browse the repository at this point in the history
* christian-fei/master:
  Fix second DeprecationWarning about os.tmpDir()
  Fix first DeprecationWarning about os.tmpDir()
  • Loading branch information
kornelski committed Dec 13, 2016
2 parents 0de5d83 + 63b4e9d commit 66e7edb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Readme.md
Expand Up @@ -87,7 +87,7 @@ Sets encoding for incoming form fields.
form.uploadDir = "/my/dir";
```
Sets the directory for placing file uploads in. You can move them later on using
`fs.rename()`. The default is `os.tmpDir()`.
`fs.rename()`. The default is `os.tmpdir()`.

```javascript
form.keepExtensions = false;
Expand Down Expand Up @@ -304,7 +304,7 @@ Emitted when the entire request has been received, and all contained files have
* Remove support for Node.js 0.4 & 0.6 (Andrew Kelley)
* Documentation improvements (Sven Lito, Andre Azevedo)
* Add support for application/octet-stream (Ion Lupascu, Chris Scribner)
* Use os.tmpDir() to get tmp directory (Andrew Kelley)
* Use os.tmpdir() to get tmp directory (Andrew Kelley)
* Improve package.json (Andrew Kelley, Sven Lito)
* Fix benchmark script (Andrew Kelley)
* Fix scope issue in incoming_forms (Sven Lito)
Expand Down
2 changes: 1 addition & 1 deletion lib/incoming_form.js
Expand Up @@ -26,7 +26,7 @@ function IncomingForm(opts) {
this.maxFields = opts.maxFields || 1000;
this.maxFieldsSize = opts.maxFieldsSize || 2 * 1024 * 1024;
this.keepExtensions = opts.keepExtensions || false;
this.uploadDir = opts.uploadDir || os.tmpDir();
this.uploadDir = opts.uploadDir || (os.tmpdir && os.tmpdir()) || os.tmpDir();
this.encoding = opts.encoding || 'utf-8';
this.headers = null;
this.type = null;
Expand Down

0 comments on commit 66e7edb

Please sign in to comment.