forked from akai/readest
feat(library): backup to and restore from a zip file (#3571)
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user