title: Failed to execute 'readAsDataURL' on 'FileReader': parameter 1 is not of type 'Blob'
body: <p>I am saving blob in database and I want to retrieve them and show them after ajax request become successful.</p>
  <pre><code>function specificreadURL(input) {
      console.log(input)
      var reader = new window.FileReader();
      //reader.readAsArrayBuffer(input);
      reader.readAsDataURL(input);//line with error
      reader.onloadend = function() {
          var base64data = reader.result;
          console.log(base64data);
      };
  
  }
  </code></pre>
  <p>My code is above. The input is from ajax success. I tried to print in console to see what input is like. I am getting this in console.</p>
  <p><a href="https://i.stack.imgur.com/iFA8V.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iFA8V.png" alt="enter image description here" /></a></p>
  <ol>
  <li><p>How can I pass <code>blob</code> into <code>readAsDataURL()</code> like above <code>blob</code></p>
  </li>
  <li><p>I want to convert blob to base64 so i can use it src in image.</p>
  </li>
  </ol>
  <p><em><strong>UPDATE</strong></em></p>
  <pre><code>function specificreadURL(input, type) {
      console.log(input)
      var reader = new window.FileReader();
      reader.readAsDataURL(input);
      reader.onloadend = function() {
          var base64data = reader.result;
          console.log(base64data);
      };
  }
  
  for (var j = 0; j &lt; bblobfile.length; j++) {
      var blob = new Blob([bblobfile[j].blob], {
          type: bblobfile[j].type
      });
      specificreadURL(blob, bblobfile[j].type);
  }
  </code></pre>
  <p>Tried above code it is giving me the correct type but the image file is not showing. I think the conversion has something do to with it.</p>
  <p>Any idea is appreciated.</p>