Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated to NodeJS v7.0.0 #399

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Readme.md
Original file line number Diff line number Diff line change
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 @@ -272,6 +272,10 @@ Emitted when the entire request has been received, and all contained files have

## Changelog

### v1.0.15

* Use os.tmpdir() to get tmp directory (Nick Soggin)

### v1.0.14

* Add failing hash tests. (Ben Trask)
Expand Down
3 changes: 1 addition & 2 deletions lib/incoming_form.js
Original file line number Diff line number Diff line change
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();
this.encoding = opts.encoding || 'utf-8';
this.headers = null;
this.type = null;
Expand Down Expand Up @@ -555,4 +555,3 @@ IncomingForm.prototype._maybeEnd = function() {

this.emit('end');
};