title: Save image blob-object to local filesystem Javascript
body: <p>I have a blob object that I get from a canvas containing image. I change this blob to objectURL.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>let myBlob = canvas.toBlob(function(blob) {...}, 'image/jpeg', 0.95);
  let myUrl = URL.createObjectURL(myBlob);</code></pre>
  </div>
  </div>
  </p>
  
  <p>I get a blob object url like: <code>blob:file:///d324f-3fd4....</code> </p>
  
  <p>To get the location the file is saved, I try to request the filesystem at first before calling <code>getDirectory</code> method of <code>DirectoryEntry</code> object. However, I get the generic <code>File not found in the directory</code> error.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
  webkitRequestFileSystem(window.TEMPORARY, 2048*2048, resolve, errorHandler);
  // doesn't resolve to any value</code></pre>
  </div>
  </div>
  </p>
  
  <p>I searched everywhere in the <code>AppData</code> folder in Windows 10 but no temporary files were found there. My guess is that the blob exists only inside browser-memory and not actually saved in the temporary root folder of electron.</p>