title: Node.js saving file from multipart native
body: <p>i have a question: How i could save file from multipart/form-data in native node.js without modules like busboy etc?</p>
  
  <p>I have a simple form:</p>
  
  <pre><code>&lt;form action="/upload" method="post" enctype="multipart/form-data"&gt;
      &lt;input type="file" name="file1"&gt;
      &lt;button type="submit"&gt;Upload&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>and:</p>
  
  <pre><code>app.post('/upload', function(req, res) {
      req.on('data', function(chunk) {
          console.log(chunk.toString());
      });
  })
  </code></pre>
  
  <p>chunk returned this:</p>
  
  <pre><code>------WebKitFormBoundaryCAtgaK18LJANVeUL
  Content-Disposition: form-data; name="file1"; filename="somefile.txt"
  Content-Type: text/plain
  
  Some content from txt file... blablabla...
  ------WebKitFormBoundaryCAtgaK18LJANVeUL--
  </code></pre>
  
  <p>How can i save it as a file from this? What is the best way to create uploading file system from this?</p>