I have a blob object that I get from a canvas containing image. I change this blob to objectURL.
let myBlob = canvas.toBlob(function(blob) {...}, 'image/jpeg', 0.95);
let myUrl = URL.createObjectURL(myBlob);
I get a blob object url like: blob:file:///d324f-3fd4....
To get the location the file is saved, I try to request the filesystem at first before calling getDirectory
method of DirectoryEntry
object. However, I get the generic File not found in the directory
error.
window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
webkitRequestFileSystem(window.TEMPORARY, 2048*2048, resolve, errorHandler);
// doesn't resolve to any value
I searched everywhere in the AppData
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.