D
D
Denis2020-02-22 15:46:13
Android
Denis, 2020-02-22 15:46:13

Ionic 4 + capacitor. How to open a file?

I'm trying to open a file that is in the system, which was successfully downloadedFilesystem.writeFile

viewFile() {
      try {
        Filesystem.readFile({
          path: "enedis.pdf",
          directory: FilesystemDirectory.Documents
        });
      } catch (e) {
        console.error("Read file error", e);
      }
    },


But nothing happens.
Here is what the console says
5e51227047a8e850455537.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Aetae, 2020-02-22
@Aetae

What should happen? You have loaded the file into memory, but do nothing else with it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question