title: NodeJS ExpressJS Multer File Extension to lowercase
body: <p>I tried to upload image by ExpressJS as Multer</p>
  
  <p>I already know upload to path on my directory. but, i have some problems in here.</p>
  
  <p>I Setup to upload only image/jpg, image/jpeg files. after upload, exactly renaming only ".jpg" with lowercase, Front-end users can upload (.JPG, .JPEG, .jpg, .jpeg)</p>
  
  <p>but i can't find control file extension on Multer.</p>
  
  <p>How to do this?</p>
  
  <p>please help me. Have a good day.</p>
  
  <pre><code>app.post('/api/song/cover',
      multer({ //NOTE: Upload Parse From Multipart/data
          dest: './public/res/cover/',
          onFileUploadStart: function (file) {
              if (file.mimetype !== 'image/jpg' &amp;&amp; file.mimetype !== 'image/jpeg') {
                  return false;
              }
          },
          rename: function(fieldname, filename, req, res) {
              var payload = JSON.parse(req.body.data);
  
              return payload.key;
          }
      }),
      function (req, res, next) {
          //something do my scripts.
      });
  </code></pre>