feat(library): backup to and restore from a zip file (#3571)

This commit is contained in:
Huang Xin
2026-03-21 01:27:52 +08:00
committed by GitHub
parent e8f70b896e
commit 91bc4ddec7
51 changed files with 1580 additions and 138 deletions
@@ -328,10 +328,10 @@ export class WebAppService extends BaseAppService {
async saveFile(
filename: string,
content: string | ArrayBuffer,
mimeType?: string,
options?: { filePath?: string; mimeType?: string },
): Promise<boolean> {
try {
const blob = new Blob([content], { type: mimeType || 'application/octet-stream' });
const blob = new Blob([content], { type: options?.mimeType || 'application/octet-stream' });
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;