-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
blob.type
is empty for certain image urls
#40
Comments
I am sorry but I cannot reproduce your error. When I try getting the blob type of the link you gave, I get
|
The blob type comes directly from the |
Thanks for the quick reply and the hint. I started Wireshark to capture HTTP packets and checked if
const win = BrowserWindow.getAllWindows()[0];
const ses = win.webContents.session;
ses.clearCache(() => {
alert("Cache cleared!");
}); I'm not sure whether it should be resolved by Another interesting fact worth noticing is that: when I use node-fetch to get the image's blob type, it's always the correct one: |
This is the corresponding HTTP request and response(304 Not Modified) I captured.
|
Yes, As for this precise problem, it may be a Chromium or electron bug. Which electron version are you using ? EDIT: a bit more detail : what happens with caching is that, even if the actual response is a 304, the |
I started this experiment using a brand new project, which meant I was using the latest version of I've attached the minimal project that I used to test this issue. You can check if you can reproduce the issue from it. Just run |
Sorry for the delayed response : it's actually a known electron bug, see electron/electron#27895 . Nothing I can do until it's fixed on Electron's side, sorry. I'm closing this issue. |
I use
electron-fetch
to get some image's blob types, as follows:It works well in most case, however, blobType is empty when url is the following one:
blob itself is not empty, here is blob object I got while debugging
So why is blob type empty? I'm using electron-fetch 1.7.4.
The text was updated successfully, but these errors were encountered: