You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -111,13 +111,13 @@ Pass in non-Busboy options directly to the middleware. These are express-fileupl
111
111
112
112
Option | Acceptable Values | Details
113
113
--- | --- | ---
114
-
safeFileNames | <ul><li><code>false</code> **(default)**</li><li><code>true</code></li><li>regex</li></ul> | Strips characters from the upload's filename. You can use custom regex to determine what to strip out. If set to `true`, non-alphanumeric characters _except_ dashes and underscores will be stripped. This option is off by default.<br /><br />**Example #1 (strip out slashes from file names):**`app.use(fileUpload({ safeFileNames: /\\/g }))`<br />**Example #2:**`app.use(fileUpload({ safeFileNames: true }))`
114
+
safeFileNames | <ul><li><code>false</code> **(default)**</li><li><code>true</code></li><li>regex</li></ul> | Strips characters from the upload's filename. You can use custom regex to determine what to strip. If set to `true`, non-alphanumeric characters _except_ dashes and underscores will be stripped. This option is off by default.<br /><br />**Example #1 (strip slashes from file names):**`app.use(fileUpload({ safeFileNames: /\\/g }))`<br />**Example #2:**`app.use(fileUpload({ safeFileNames: true }))`
115
115
116
116
# Known Bugs
117
117
##### If you're using bodyParser middleware
118
118
Add `app.use(fileUpload())`*AFTER*`app.use(bodyParser.json)` and any other `bodyParser` middlewares! This limitation will be investigated in an upcoming release.
0 commit comments