mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
feat: export all user Memos as a .zip of Markdown files (#2854)
* Add gRPC Memos Export * Update code style * Add URL.revokeObjectURL * Rename protobuf and ESLint fix * Change MemosExport to ExportMemos
This commit is contained in:
@ -92,3 +92,11 @@ export const isValidUrl = (url: string): boolean => {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
export const downloadFileFromUrl = (url: string, filename: string) => {
|
||||
const a = document.createElement("a");
|
||||
a.href = url;
|
||||
a.download = filename;
|
||||
a.click();
|
||||
a.remove();
|
||||
};
|
||||
|
Reference in New Issue
Block a user