Struggling to load an epub from the internal storage device in Ionic4? Loading from assets works fine, but loading from internal storage is proving to be a challenge with errors. Looking for a solution to this issue.
this.book = ePub("assets/temp1.epub");
this.rendition = this.book.renderTo("area", {
spread: "always"
});
this.rendition.display();
The above code displays properly when loading from assets.
const path = this.file.externalRootDirectory + 'ePub/temp1.epub';
this.book = await ePub(path);
this.rendition = this.book.renderTo("area", {
spread: "always"
});
this.rendition.display();
However, it fails to display properly when attempting to load from internal storage.