I have an express route which contains the following:
let result = await fetch("http://someurl");
result = await result.blob();
console.log(result)
const img = URL.createObjectURL(result);
This produces the following error (on line 4):
TypeError: The "obj" argument must be an instance of Blob. Received an instance of Blob
What's going on here?
If it helps, the result of the console.log is:
Blob {
[Symbol(type)]: 'image/png',
[Symbol(buffer)]: <Buffer 89 50 4e ... 481501 more bytes>
}
and the fetch route goes to another express app which calls res.sendFile(myfilepath)