futurepress / epubjs-rn

EpubJS React Native Example
Other
267 stars 151 forks source link

Cannot create URL for blob! #125

Open khoipn opened 5 years ago

khoipn commented 5 years ago

I have tried to apply the this plugin to my React Native project, link to Epub public url

<Epub src={"https://s3.amazonaws.com/epubjs/books/moby-dick.epub"} flow={"paginated"} />

But, I always get the error message: Cannot create URL for blob!, Help me please

NigolBista commented 4 years ago

In node_modules/epubjs-rn/components/Streamer.js replace key:"filename",value:function filename(bookUrl){var uri=new Uri(bookUrl); return uri.filename.replace(".epub","") with key:"filename",value:function filename(bookUrl){var uri=new Uri(bookUrl);var fileName = uri.filename.replace(".epub",""); fileName = fileName.replace(/[^a-zA-z ]/g, ""); return fileName;}