title: Convert base64 image data to image file in angularjs
body: <p>getting corrupted file while converting base64 file to image in angularjs can anyone suggest me how to convert base64 file to image in angularjs</p>
  
  <p>I am using this method to convert base64 file to image</p>
  
  <pre><code>var imageBase64 = "image base64 data";
  var blob = new Blob([imageBase64], {type: 'image/png'});
  </code></pre>
  
  <p>From this blob, you can generate file object.</p>
  
  <pre><code>var file = new File([blob], 'imageFileName.png');
  </code></pre>