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;