title: Node.js Multer upload array missing single file
body: <p>I am currently using Multer to upload multiple files at once. When I log the incoming files I get every file that I want to upload, but it only uploads missing 1 file. So when i upload 7 files, 6 are actually uploaded, when I upload 6 files, 5 are uploaded and so on.</p>
  
  <p>The files that I upload are also not too big. It starts when I want to upload more than 4 files.</p>
  
  <p>I don't see what I am doing wrong.</p>
  
  <p><br>
  <strong>My Controller:</strong></p>
  
  <pre><code>var uploadMemory = multer().array("memory");
  
  const addMemory = (req, res) =&gt; {
      console.log(req.files);
  
      uploadMemory(req, res, function(err) {
          if (!err) {
              res.json({
                  status: "succes"
              });
          }
      });
  };
  
  </code></pre>
  
  <p><br>
  <strong>My multer function:</strong></p>
  
  <pre><code>var storage = multer.diskStorage({
      destination: "./public/uploads",
      filename: function(req, file, cb) {
          cb(null, Date.now() + "." + file.mimetype.split("/")[1]);
      }
  });
  
  app.use(multer({ storage: storage }).any());
  </code></pre>