Extra module 4 - File Management

Dealing with files and their lifecycle, much like entities.

Now, we shall make another upgrade to our system. Let's allow a product to have images, so that a user may see them on the store page (if a frontend is available). Here, we'll learn how to manage files, in order to implement this new feature.

Let's then begin by installing the types package for Multer. Multer is the middleware, here encapsulated by Nest, that extracts files from the request. This package will soon be used for typing files.

yarn add -D @types/multer

And also, if you want files to experiment with during this module, you can obtain some here.

Last updated