-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kepub.epub download and UTF8 Content-Disposition #71
Comments
Thanks for tracking this down. At the moment in Lines 80 to 86 in 630075c
From what I can see in the code, the only actual change inside the EPUB file for Kobo in Book->getUpdatedEpub() is to add another property for cover-image if there is a cover image in EPub->updateForKepub(). If you can live without that part, we could change the logic and send the unchanged EPUB file directly in Line 90 in 630075c
But I don't know if you need that updated metadata for anything else for Kobo or not... |
Thank you @mikespub for looking into this, much appreciated. I have a feeling that the property update is probably needed for cover display (one of the things that doesn't work as well on Kobo's with .epub files is the covers) but more than willing to test to see whether that is the case or not! Is there an easy way for me to stop the cover property change? |
The change above allows you to test Since this will not update the opf properties for cover-image in the EPub file, this might not work correctly for Kobo, but if it does work you won't need to hack the ZipStream library after each upgrade anymore |
Would using kepubify be a possible solution to all this? |
If the epubs are uploaded to the Kobo from Calibre without using COPS at all what happens? Is the same problem there? Is there a setting in Calibre that fixes the issue? |
Hi all,
Some background: I have just upgraded to 2.2.1 from 2.1.5, although I suspect this goes back past that as I'm not sure I have tired to download books from my COPS when I moved from the original SebLucas version to this one until now.
On Kobos, if you don't put the suffix .kepub.epub on the file the reading experience is severely reduced. I thought the rename process in COPS was working, but it turns out the Kobo browser doesn't support UTF8 encoding in Content-Disposition. So, for example, this doesn't work:
...and results in the file being called the original .epub filename.
But, this works:
To get COPS to produce the above, I made the following change to
vendor/maennchen/zipstream-php/src/ZipStream.php
, functionsendHttpHeaders()
however, there may well be a better way and place to fix it (not in the vendor code, for example!), or of course I have missed some other way of making this work. Happy to share config_local.php if that would help.
The text was updated successfully, but these errors were encountered: