Mimetype error when submitting epub3 to validation

8 posts / 0 new
Last post

Hi,
I have spent weeks trying to figure out this problem and am hoping you can help me! I am trying to zip my files in the creation of an epub3. I know that the mimetype.txt file must be submitted first (without compression) and then after the OEBPS and META-INF folders - but when I do so (via Winzip, 7zip - I have tried them all!) they all produce the mimetype error. I do not have any additional elements or spaces in the mimetype file - and I am wondering whether extra elements are being added to the mimetupe file in the process of zipping (like timestamp data for example). I have been teaching myself code but am still very much a newbie. If anyone can help me with this I will be SO grateful!!!
Thank you!

First guess is that you've actually named the file "mimetype.txt". There's no extension on the mimetype file, so you'll get an error if you add one.

If not, which specific error are you getting? There are a few different ones that can arise from the mimetype file depending on what is in error.

Matt, you cannot know how grateful I am for your help. You fixed it! It was the .txt extension after all this time!! I have been pulling my hair out for weeks over this issue, and become so stressed - caught up in byte offset and a variety of zipping programs. And it was this simple little thing I missed! THANK YOU SO MUCH!!!!

Glad to hear it helped. EPUB turned my hair grey, but don't lose yours over errors... ;)

Hi,
I have the same problem and my file without any extantion, I get this massage:
Mimetype contains wrong type (application/epub+zip expected).
Even my file contain only this:
application/epub+zip

Are you familiar with that issue?
thx

The common cause is extra whitespace in the file. Make sure there are no extra spaces and that you haven't added a hard return after the mime type.

Hello,

I have the same problem. My mimetype only contains this: application/epub+zip and the error I get is Mimetype contains wrong type (application/epub+zip expected).

There are no extra spaces in my mimetype. I have to upload my epub to a distributor, but they won't accept it with the current error.

How do I fix this?

If you are sure, that there is no additional whitespace, the next idea could the presence of a BOM at the beginning of the file - I never tried, whether this matters or not, maybe it depends on the checker/program as well.

A simple option for you without finding out, what is wrong, would be simply to copy this file from another EPUB without such a problem ;o)

Secondary menu