From 4f702a0dde63c97c403fdfc9314cbbd531a43bb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=BA=D0=BE=D0=B2=D0=BE=D1=80=D0=BE=D0=B4=D0=B0=20?= =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=90=D0=BD=D0=B4=D1=80?= =?UTF-8?q?=D0=B5=D0=B5=D0=B2=D0=B8=D1=87?= Date: Fri, 13 May 2016 19:33:45 +0300 Subject: [PATCH] use os.tmpdir() instead of os.tmpDir() --- Readme.md | 2 +- lib/incoming_form.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Readme.md b/Readme.md index 19a42b78..65ff8034 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; diff --git a/lib/incoming_form.js b/lib/incoming_form.js index e3c8019a..4a839012 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;