Skip to content

Commit

Permalink
files: fix downloads in some older browsers (#1257)
Browse files Browse the repository at this point in the history
Co-authored-by: Muffin <[email protected]>
  • Loading branch information
FurryR and GarboMuffin authored Jan 27, 2024
1 parent 0d0e10a commit bba8138
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion extensions/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,10 @@
const downloadBlob = (blob, file) => {
const url = URL.createObjectURL(blob);
downloadURL(url, file);
URL.revokeObjectURL(url);
// Some old browsers process Blob URLs asynchronously
setTimeout(() => {
URL.revokeObjectURL(url);
}, 1000);
};

/**
Expand Down

0 comments on commit bba8138

Please sign in to comment.