title: nestjs multer get list of new file names after multer storage
body: <p>I have this middleware that I use to upload files.</p>
  
  <pre><code>@Injectable()
  export class FilesMiddleware implements NestMiddleware {
  
    private storage = multer.diskStorage({
      destination: (req, file, cb) =&gt; {
        cb(null, path.join(__dirname, '../../uploads/'));
      },
      filename: (req, file, cb) =&gt; {
        let extArray = file.mimetype.split("/");
        let extension = extArray[extArray.length - 1];
        cb(null, file.fieldname + '-' + Date.now() + '.' + extension)
      }
  });
  
    resolve(...args: any[]): MiddlewareFunction {
      return (req, res, next) =&gt; {
        console.log(req.files);
        const upload = multer({storage: this.storage});
        upload.any();
        return next();
      }
    }
  }
  </code></pre>
  
  <p>The problem that in my request, when I use <code>req.files</code> it gives me the original file names instead of the new file names (with date, etc like I set in the multer storage options).</p>
  
  <p>Is there a way I can get the new file names multer just uploaded with the middleware?</p>
  
  <pre><code>@Post('upload')
  @UseInterceptors(FilesInterceptor('files[]', 20, {}))
  public async onUpload(@Request() req, @Response() res, @UploadedFiles() files) {
      const mediaResponse = await this.media.saveMedias(0, files);
      res.json({status: true});
  }
  </code></pre>