02-21-2012, 05:55 AM | #1 |
Junior Member
Posts: 6
Karma: 10
Join Date: Feb 2012
Device: Kobo touch
|
Browser-Download of epub Files
Im working on a standalone browser library for Kobo Touch users.
I have a big problem about the download function. When ever i open a Link to an .epub-File, the browser does not download it. It just opens the file cryptik inside the browser that freezes after that. First i thought: there is no way it could be solved. But gutenberg.org does have a solution for that. Also it works inside the calibre library that you reach through your webbrowser. How do they get the files to download? Or easier: How do they bring up the box that asks if file should be downloadet or not? Sorry for my bad english |
02-21-2012, 07:43 AM | #2 |
Connoisseur
Posts: 87
Karma: 2975
Join Date: Jan 2012
Location: Germany
Device: Kobo Touch
|
Have a look at the mime type sent by the server. This should control how the browser reacts.
Regards Aydan |
Advert | |
|
02-21-2012, 08:36 AM | #3 |
Junior Member
Posts: 6
Karma: 10
Join Date: Feb 2012
Device: Kobo touch
|
<a type="application/octet-stream" href="xxx.epub">
or <a type="application/epub+zip" href="xxx.epub"> or <a type="application/force-download" href="xxx.epub"> did not work. The header manipulation inside the file did also not work. Any other hints? |
02-21-2012, 08:50 AM | #4 | |
Connoisseur
Posts: 87
Karma: 2975
Join Date: Jan 2012
Location: Germany
Device: Kobo Touch
|
Check the HTTP response header of your response.
This is what project gutenberg spits out as an example: Quote:
Regards Aydan |
|
02-21-2012, 08:57 AM | #5 | |
Junior Member
Posts: 6
Karma: 10
Join Date: Feb 2012
Device: Kobo touch
|
Quote:
But how can i change it without touching the apache settings? |
|
Advert | |
|
02-21-2012, 09:11 AM | #7 |
Junior Member
Posts: 6
Karma: 10
Join Date: Feb 2012
Device: Kobo touch
|
thanks for the answer.. so now i see that my hoster does not make the right settings for epubs.
|
02-21-2012, 01:19 PM | #8 |
Wizard
Posts: 1,142
Karma: 5061953
Join Date: Jun 2011
Location: Ontario, Canada
Device: Kobo Aura HD
|
The real culprit here is the damnabe "mime magic" plugin that Apache installs by default. Without this plugin, any file with an extension that Apache doesn't recognized gets passed to the browser as binary-bin. At worst case, that means the browser will at least let you download/save the file (without requiring a right-click save link as...) I've seen that mime magic cause *all* kinds of mischief by mis-identifying files as text.
|
02-21-2012, 02:31 PM | #9 |
Junior Member
Posts: 6
Karma: 10
Join Date: Feb 2012
Device: Kobo touch
|
I asked my hoster but he won't change the settings on the Apache config.
Is there any easy and working MIME-Type configuration inside the webpage possible? Without htaccess? |
02-22-2012, 10:09 AM | #10 |
Just me :)
Posts: 106
Karma: 1282
Join Date: Jan 2012
Location: Germany
Device: Kobo Touch
|
If you have PHP available sth. like this should do the trick:
http://www.ryboe.com/tutorials/php-h...force-download |
02-23-2012, 07:42 AM | #11 |
Junior Member
Posts: 6
Karma: 10
Join Date: Feb 2012
Device: Kobo touch
|
The problem is:
The KoboBrowser does not open URLs which begin with header manipulation... Dont ask me why. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Can't download from browser in Android | TallMomof2 | Devices | 17 | 10-19-2011 09:58 AM |
Download PDF through browser? | bberrry | Amazon Kindle | 3 | 02-18-2011 05:27 AM |
PB 602: EPUB Download via Browser | miwie | PocketBook | 1 | 11-29-2010 04:50 AM |
Classic Download *ePUB* to Computer via Browser? | EatingPie | Barnes & Noble NOOK | 18 | 11-11-2010 04:23 PM |