Skip to content

Commit 565367c

Browse files
docs(): some tweaks to file upload
1 parent d7e7b95 commit 565367c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

content/techniques/file-upload.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ To handle file uploading, Nest provides a built-in module based on the [multer](
44

55
> warning **Warning** Multer cannot process data which is not in the supported multipart format (`multipart/form-data`). Also, note that this package is not compatible with the `FastifyAdapter`.
66
7-
#### Use with Express (default)
8-
9-
If you want to use the `Express.Multer.File` type for `@UploadedFile()` files, it is necessary to install the types:
7+
For better type safety, let's install Multer typings package:
108

119
```shell
1210
$ npm i -D @types/multer
1311
```
1412

13+
With this package installed, we can now use the `Express.Multer.File` type (you can import this type as follows: `import {{ '{' }} Express {{ '}' }} from 'express'`).
14+
1515
#### Basic example
1616

1717
To upload a single file, simply tie the `FileInterceptor()` interceptor to the route handler and extract `file` from the `request` using the `@UploadedFile()` decorator.

0 commit comments

Comments
 (0)