title: How to post multipart/form-data from Angular to Nodejs Multer?
body: <p>From Angular I want to upload a image as Blob data to nodeJS server. The server uses <em>multer</em> in the backend. The image file is generated by canvas render. I am getting the following error from the server:</p>
  
  <blockquote>
    <p>Error: Multipart: Boundary not found status:500</p>
  </blockquote>
  
  <p>The following is my code. Please help me to find out the issue.</p>
  
  <p>Angular:</p>
  
  <pre><code>// blob:Blob;   -&gt;  it has valid image data.
  var formData: FormData = new FormData();
  formData.append('banner', blob, "my-file.png")
  
  this.http.post(url,
      formData, { headers: new Headers({ 'Content-Type': 'multipart/form-data' }) })
      .toPromise()
      .then(res =&gt; {
        console.log(res);
        return res.json();
      })
      .catch(this.handleError);
  </code></pre>
  
  <p>nodejs:</p>
  
  <pre><code>router.post('/upload-banner-image', bannerImageUpload.single('banner'), watchfaceController.uploadWatchfaceBannerImage);
  </code></pre>