From f1d6160a169643726efdc67fc588762f87282d9e Mon Sep 17 00:00:00 2001 From: Nick Soggin Date: Tue, 25 Oct 2016 10:57:33 -0400 Subject: [PATCH] Updated to NodeJS v7.0.0 --- Readme.md | 6 +++++- lib/incoming_form.js | 3 +-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Readme.md b/Readme.md index 7aaee33a..d9d0639d 100644 --- a/Readme.md +++ b/Readme.md @@ -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; @@ -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) diff --git a/lib/incoming_form.js b/lib/incoming_form.js index e3c8019a..3304a7cf 100644 --- a/lib/incoming_form.js +++ b/lib/incoming_form.js @@ -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; @@ -555,4 +555,3 @@ IncomingForm.prototype._maybeEnd = function() { this.emit('end'); }; -