title: Extract zip into folder node via express
body: <p>I try to find example where I can send a zip (like via postman) 
  and get this zip in my handler and <strong>unzip</strong> <strong>it so specified folder</strong>
  I didn't find much examples for zipping using <code>express</code> 
  I want to unzip it in path <code>web/app</code></p>
  
  <p>I try something like the following which doesn't works for me , the zip file is not unzipped in the specified folder, any idea what im doing wrong ? </p>
  
  <p><a href="https://nodejs.org/api/zlib.html#zlib_zlib" rel="noreferrer">https://nodejs.org/api/zlib.html#zlib_zlib</a></p>
  
  <pre><code>var zlib = require('zlib');
  var fs = require('fs');
  const dir = path.join(__dirname, 'web/app/');
  
  if (req.file.mimetype === 'application/zip') {
  
      var unzip = zlib.createUnzip();
  
      var read = fs.createReadStream(req.file);
      var write = fs.createWriteStream(dir);
      //Transform stream which is unzipping the zipped file
      read.pipe(unzip).pipe(write);   
      console.log("unZipped Successfully");
  
  }
  </code></pre>
  
  <p>Any working example will be very helpful, or reference where can I've problem...</p>
  
  <p>while debug I see the that this is when the code failed </p>
  
  <p><code>var read = fs.createReadStream(req.file);</code></p>
  
  <p>any idea why?</p>
  
  <p>I've also tried with </p>
  
  <p><code>var read = fs.createReadStream(req.file.body);</code></p>
  
  <p>the issue that I dont see the error, reason etc.</p>
  
  <p>when I change it to </p>
  
  <p><code>var read = fs.createReadStream(req.file.buffer);</code></p>
  
  <p>the program doesnt exit and i was able to run it until the logger <code>console.log("unZipped Successfully");</code> but nothing happen...</p>
  
  <p>if there any example with <a href="https://www.npmjs.com/package/yauzl" rel="noreferrer">https://www.npmjs.com/package/yauzl</a> <strong>yauzl and multer</strong>
   in my context it will be great</p>
  
  <p>update- this is the postman request</p>
  
  <p><a href="https://i.stack.imgur.com/yX5QR.png" rel="noreferrer"><img src="https://i.stack.imgur.com/yX5QR.png" alt="enter image description here"></a></p>