basic file sharing
This commit is contained in:
@@ -75,3 +75,14 @@ export async function pasteFile(
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
export function downloadFile(fileName: string, href: string) {
|
||||
const anchor = document.createElement('a');
|
||||
|
||||
anchor.href = href;
|
||||
anchor.download = fileName;
|
||||
anchor.rel = 'noopener';
|
||||
anchor.target = '_blank';
|
||||
|
||||
anchor.click();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user