Skip to content

Commit b145f5e

Browse files
Merge pull request #2968 from CodingWatchCollector/patch-2
docs: update file-upload.md with additional hint (make file optional in file upload)
2 parents b4d0f62 + 4d033da commit b145f5e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

content/techniques/file-upload.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,8 @@ Finally, you can use the special `ParseFilePipeBuilder` class that lets you comp
155155
file: Express.Multer.File,
156156
```
157157

158+
> info **Hint** File presence is required by default, but you can make it optional by adding `fileIsRequired: false` parameter inside `build` function options (at the same level as `errorHttpStatusCode`).
159+
158160
#### Array of files
159161

160162
To upload an array of files (identified with a single field name), use the `FilesInterceptor()` decorator (note the plural **Files** in the decorator name). This decorator takes three arguments:

0 commit comments

Comments
 (0)