Comparing version 1.0.6 to 1.1.0
@@ -6,2 +6,6 @@ # Change log | ||
## 1.1.0 - 2015-10-23 | ||
- Feature: accept any file, regardless of fieldname | ||
## 1.0.6 - 2015-10-03 | ||
@@ -8,0 +12,0 @@ |
13
index.js
@@ -69,2 +69,15 @@ var makeError = require('./lib/make-error') | ||
Multer.prototype.any = function () { | ||
function setup () { | ||
return { | ||
limits: this.limits, | ||
storage: this.storage, | ||
fileFilter: this.fileFilter, | ||
fileStrategy: 'ARRAY' | ||
} | ||
} | ||
return makeMiddleware(setup.bind(this)) | ||
} | ||
function multer (options) { | ||
@@ -71,0 +84,0 @@ if (options === undefined) { |
{ | ||
"name": "multer", | ||
"description": "Middleware for handling `multipart/form-data`.", | ||
"version": "1.0.6", | ||
"version": "1.1.0", | ||
"contributors": [ | ||
@@ -6,0 +6,0 @@ "Hage Yaapa <captain@hacksparrow.com> (http://www.hacksparrow.com)", |
@@ -134,2 +134,12 @@ # Multer [![Build Status](https://travis-ci.org/expressjs/multer.svg?branch=master)](https://travis-ci.org/expressjs/multer) [![NPM version](https://badge.fury.io/js/multer.svg)](https://badge.fury.io/js/multer) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard) | ||
#### `.any()` | ||
Accepts all files that comes over the wire. An array of files will be stored in | ||
`req.files`. | ||
**WARNING:** Make sure that you always handle the files that a user uploads. | ||
Never add multer as a global middleware since a malicious user could upload | ||
files to a route that you didn't anticipate. Only use this function on routes | ||
where you are handling the uploaded files. | ||
### `storage` | ||
@@ -136,0 +146,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24898
399
277