Handle inline images and attachments via data urls

This commit is contained in:
Zef Hemel
2023-01-08 15:29:34 +01:00
parent 0365673c41
commit 8dac58f38a
7 changed files with 53 additions and 16 deletions
+5
View File
@@ -46,6 +46,11 @@ export function openUrl(url: string): Promise<void> {
return syscall("editor.openUrl", url);
}
// Force the client to download the file in dataUrl with filename as file name
export function downloadFile(filename: string, dataUrl: string): Promise<void> {
return syscall("editor.downloadFile", filename, dataUrl);
}
export function flashNotification(
message: string,
type: "info" | "error" = "info",