You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 7, 2025. It is now read-only.
Using cloud-reader-lite v.0.31.1 trying to open a packaged .epub file results in an error message "Invalid / Corrupted EPUB". Console Output shows that readium recognizes the url to be a folder instead of a packaged file:
--- using PlainResourceFetcher
This is caused by an error in a Regex in js/epub-fetch/publication_fetcher.js on line 91:
return !(/.epub[3?]$/.test(uriTrimmed));
Correct Regex should be:
return !(/.epub[3]?$/.test(uriTrimmed));
This issue is a Bug
Expected Behaviour
Expect Ebok Urls ending on .epub to be handled as packaged EPub files and load them using ZipResourceFetcher.
Observed behaviour
Readium assumes Urls ending on .epub to be folders and tries loading them using PlainResourceFetcher, which fails.
Steps to reproduce
Set up cloud-reader-lite v.0.31.1
Put test.epub package in subfolder epub_content
Load in Webbrowser using index.html?epub=epub_content/test.epub
Note: Problem does not occur if epub file is dragged and dropped into the browser/cloud reader.
Test file(s)
Reprocudible with any .epub file, for example moby dick