epubjs-reader
epubjs-reader copied to clipboard
META-INF/container.xml error while serving epub file as web api
When I send the file using static file path it works but if I serve file as res.sendFile(..) it is not working and not even hitting this api?
I am getting META-INF/container.xml is not found error?
What do I have to do in order to make it work.
Thank You
Hey fixed it by adding /file.epub at the end of the url.
Looks pretty wacko.
I was doing /download/<id>
now I have to do download/<id>/file.epub
@jdupl Thank you so much!!!
I have refactored and changed the code for the past 2 hours just to find out that all that was missing is the .epub
suffix at the end of the api route...
@jdupl For me, it is angular-epub-viewer which reads the CDN presigned URL. But the above solution worked. ( During uploading, I forgot to add extension".epub" in the file name. )
@jdupl How did you go about solving this issue ? the URL which i am passing is a blob url that has a token parameter. it is giving me the same error :
help
help
help
help
help
please, I am unable to live without this project
please, I am unable to live without this project
It's part of standard defined here: https://www.w3.org/publishing/epub3/epub-ocf.html#sec-container-metainf-container.xml
I was having this issue in this project, but Google brought me here.
I was debugging this, the issue is the Zip was created having the ZipEntry in Windows: META-INF\container.xml
But unfortunately, this check is not passing: https://github.com/w3c/epubcheck/blob/58a61935a8fdd2875539be58dc6bc1ed87615740/src/main/java/com/adobe/epubcheck/ocf/OCFChecker.java#L116
This is because the value of that constant contains this path: META-INF/container.xml
https://github.com/w3c/epubcheck/blob/58a61935a8fdd2875539be58dc6bc1ed87615740/src/main/java/com/adobe/epubcheck/ocf/OCFData.java#L9
It is failing to pass that check, even having the file inside the ZIP, because of that.
I have created an issue here: https://github.com/w3c/epubcheck/issues/1357