+4
-0
@@ -6,2 +6,6 @@ # Change log | ||
| ## 1.2.0 - 2016-08-04 | ||
| - Feature: add .none() for accepting only fields | ||
| ## 1.1.0 - 2015-10-23 | ||
@@ -8,0 +12,0 @@ |
+4
-0
@@ -69,2 +69,6 @@ var makeError = require('./lib/make-error') | ||
| Multer.prototype.none = function () { | ||
| return this._makeMiddleware([], 'NONE') | ||
| } | ||
| Multer.prototype.any = function () { | ||
@@ -71,0 +75,0 @@ function setup () { |
@@ -13,2 +13,3 @@ var objectAssign = require('object-assign') | ||
| switch (strategy) { | ||
| case 'NONE': break | ||
| case 'VALUE': break | ||
@@ -27,2 +28,3 @@ case 'ARRAY': req.files = []; break | ||
| switch (this.strategy) { | ||
| case 'NONE': break | ||
| case 'VALUE': break | ||
@@ -44,2 +46,3 @@ case 'ARRAY': this.req.files.push(placeholder); break | ||
| switch (this.strategy) { | ||
| case 'NONE': break | ||
| case 'VALUE': break | ||
@@ -46,0 +49,0 @@ case 'ARRAY': arrayRemove(this.req.files, placeholder); break |
+1
-1
| { | ||
| "name": "multer", | ||
| "description": "Middleware for handling `multipart/form-data`.", | ||
| "version": "1.1.0", | ||
| "version": "1.2.0", | ||
| "contributors": [ | ||
@@ -6,0 +6,0 @@ "Hage Yaapa <captain@hacksparrow.com> (http://www.hacksparrow.com)", |
+5
-0
@@ -134,2 +134,7 @@ # Multer [](https://travis-ci.org/expressjs/multer) [](https://badge.fury.io/js/multer) [](https://github.com/feross/standard) | ||
| #### `.none()` | ||
| Accept only text fields. If any file upload is made, error with code | ||
| "LIMIT\_UNEXPECTED\_FILE" will be issued. This is the same as doing `upload.fields([])`. | ||
| #### `.any()` | ||
@@ -136,0 +141,0 @@ |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
25298
1.61%405
1.5%282
1.81%