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
@@ -545,14 +545,13 @@ export class NativeAppService extends BaseAppService {
async saveFile(
filename: string,
content: string | ArrayBuffer,
filepath: string,
mimeType?: string,
options?: { filePath?: string; mimeType?: string },
): Promise<boolean> {
try {
const ext = filename.split('.').pop() || '';
if (this.isIOSApp) {
await shareFile(filepath, {
mimeType: mimeType || 'application/octet-stream',
if (this.isIOSApp && options?.filePath) {
await shareFile(options.filePath, {
mimeType: options?.mimeType || 'application/octet-stream',
});
} else {
const filePath = await saveDialog({