Resizes files uploads and stores them in a given directory
is an Express middleware that aims to make resizing and moving of image file uploads easier.
If you are looking for a general purpose upload solution try express-upload.
You can use this middleware globally in your app your locally in your routes like this:
You can specify more than one resize method per tyoe by using an array of options like this:
The middleware tries to keep the original filename if it is unique to the location. Otherwise it will generate a unique name by appending a counter to the name. E.g. logo.png will become logo___1__.png_ if another logo.png already exists.
The path of the resized and moved file can be option with the
file.path property, the name with