View Single Post
Old 06-12-2018, 06:22 AM   #1
baskerville
Evangelist
baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.
 
baskerville's Avatar
 
Posts: 446
Karma: 305160
Join Date: Aug 2015
Device: Kobo Glo HD, Kobo Aura ONE
On The MIME Type of ePUBs

The MIME type of an ePUB file should be application/epub+zip.

You can find non-conforming ePUBs within your library with:
Code:
file --mime-type **/*.epub | grep -v 'application/epub+zip'
This can happen if the mimetype file:
  • Is missing.
  • Isn't the first entry.
  • Is compressed instead of stored.
  • Has extra fields.
  • Contains the wrong MIME type (seems unlikely).

You can solve the problem by unpacking the ePUB and repacking it with:
Code:
[ -e mimetype ] || printf '%s' 'application/epub+zip' > mimetype
zip -X -Z store abc.epub mimetype
zip -r abc.epub . -x mimetype
baskerville is offline   Reply With Quote