I want to get file like this:
const response = await fetch(url);
const blob = await response.blob();
const file = await new File([blob], `${filename}.${mime.getExtension(blob.type)}`, { type: blob.type });
I got error like this: When I close the console.
But when I open the Chrome browser's console, I can successfully fetch resources: When I open the console.
I've tried using XHR or the solution mentioned at CORS enabled images on MDN.
I encountered the same issue as mentioned above – the cross-domain request is successful only when the console is open.