The options to construct the controller.
Protected
Readonly
_mimeThe MIME type library. Since it's an ESM only module, Jimpex loads it on boot and makes it available on the container.
Protected
_optionsThe controller customization options.
Protected
Readonly
_sendThe service that serves static files.
Protected
filesA dictionary with the formatted definitions of the files that will be served. It uses the files' routes as keys, for easy access in the middleware.
The controller options.
Protected
_addMounts the middleware(s) for a file in the router.
The information of the file and how it needs to be added.
Protected
_createParses the files received from the constructor's options, and formats them into proper definitions the controller can use.
Protected
_getGenerates the middleware that will serve the file.
The definition of the file to serve.
Protected
_validateValidates and formats the options sent to the constructor in order to get the final set that will be stored in the controller.
The options to validate.
Mounts the middlewares in the router in order to serve the files.
A reference to the application router.
A list of extra middlewares to execute before the file middleware.
The controller class that allows the application to serve specific files from any folder to any route without the need of mounting directories as "static".
Prettierignore