ionic-epubjs icon indicating copy to clipboard operation
ionic-epubjs copied to clipboard

Can't open .epub file downloaded by FileTransfer

Open coelhucas opened this issue 6 years ago • 3 comments

well, probably it's some noob mistake but after spending some hours trying to fix it I needed to come here.

   this.fileTransfer.download('https://github.com/janpio/ionic-epubjs/raw/master/src/assets/books/moby-dick.epub', path + 'moby-dick.epub').then(entry => {
      this.finishedDownload = true;
      let url = entry.toURL();
      this.current_book = new Book();
      this.current_book.label = "Moby Dick (.epub)";
      this.current_book.file =  path + 'moby-dick.epub';
    })

which is not working. to make it happen I need to use an already existing local path:

    this.current_book = new Book();
    this.current_book.label = "Moby Dick (.epub)";
    this.current_book.file =  "assets/books/moby-dick.epub";

how can I fix it? I've already tried using as the this.current_book.file: entry.toURL(), path + 'moby-dick.epub', only path... anyone knows what can I do?

coelhucas avatar Jul 10 '18 19:07 coelhucas