September 2017
Intermediate to advanced
450 pages
11h 24m
English
Multer is Express middleware that provides everything that we need to parse a multipart/form-data upload by its field name. By default, it writes the file to our operating system's disk, which we can configure by providing a destination file path during initialization.
The req.file object is a reference object that Multer leaves on the Express request option, with which we can interrogate the file that was uploaded. There are many different properties in this object, each containing different information we might want to know about the file:
| Property | Description |
| fieldname |
The multipart/form-data field that contains the uploaded image |
| originalname |
The uploaded image's original filename |
| encoding |
The encoding ... |
Read now
Unlock full access