mirror of
https://github.com/hanzonet/explore.git
synced 2026-10-30 18:16:57 +00:00
form fields recaptcha v2 api integration recaptcha reset remove recaptcha key from git
11 lines
295 B
TypeScript
11 lines
295 B
TypeScript
export default function downloadBlob(blob: Blob, filename: string) {
|
|
const url = URL.createObjectURL(blob);
|
|
const link = document.createElement('a');
|
|
link.setAttribute('href', url);
|
|
link.setAttribute('download', filename);
|
|
link.click();
|
|
|
|
link.remove();
|
|
URL.revokeObjectURL(url);
|
|
}
|