Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 230394

File.writeFile: Not working on Android Capacitor

$
0
0

I gave it now a second attempt with the Capacitor’s implementation. Same issue.

    if (isPlatform('android')) {
        if (filename.includes(".json")) {
            filename = filename.replace(".json", ".xlsx");
            encodeBase64(content)
        }
        const result = await Filesystem.writeFile({
            path: filename,
            data: content,
            directory: Directory.Documents
        });

        FileOpener.showOpenWithDialog(result.uri, mimeType)
    }

Viewing all articles
Browse latest Browse all 230394

Trending Articles