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:
Noah Alderton
2024-01-30 00:42:54 -08:00
committed by GitHub
parent 50f7f131ea
commit 73337331cb
13 changed files with 719 additions and 245 deletions

View File

@ -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();
};