![]() |
#1 |
Member
![]() Posts: 22
Karma: 10
Join Date: Jul 2012
Device: kobo
|
page to download an epub to my kobo
Hello,
I have created a php page to download an epub, using headers commands like this: PHP Code:
I guess somehow the headers are wrong, could anybody please help me out with this? Thanks in adavance, French Imp |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
|
![]() |
![]() |
![]() |
#3 |
Member
![]() Posts: 22
Karma: 10
Join Date: Jul 2012
Device: kobo
|
Hello,
Thank you, GeoffR, I tryied it, but it didn't work with epub+zip either. Any other ideas? |
![]() |
![]() |
![]() |
#4 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
I just did a check with the calibre server. It is setting content type to "application/epub+zip" and works fine. If you are downloading a kepub, make sure the extension is ".kepub.epub".
|
![]() |
![]() |
![]() |
#5 |
Member
![]() Posts: 22
Karma: 10
Join Date: Jul 2012
Device: kobo
|
Thank you very much for your help, davidfor. I tried changing the extension to .kepub.epub, to no avail. Btw when I provide a standard link to the file, it works ok with the extension .epub. Only, that's not what I want to do.
Could there be something wrong with my other header commands? |
![]() |
![]() |
![]() |
#6 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
Also, have you checked the server logs? Does it show the request to get the file? |
|
![]() |
![]() |
![]() |
#7 |
Member
![]() Posts: 22
Karma: 10
Join Date: Jul 2012
Device: kobo
|
The download is displayed as a buttun in a formular. The button opens a php page
containing the following code PHP Code:
This works with firefox but not with the kobo's browser. When I click on the button, the screen blinks 2 or 3 times but I don't have the dialog box asking me if I want to download. Thanks for your time. |
![]() |
![]() |
![]() |
#8 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
What does the server show? Does the above code get executed? If you can't see exactly, I suggest adding some logging statements to show. At least enough to see whether the code is being reached.
And what does the code behind the button do? If it is opening another window or tab, I don't think it will work. I won't have a chance today, but, I can try and have a play at work in the next few days. There's plenty of servers I can try something like this on. It would help to have all the code involved. Any chance? If so, send me PM with a download link, or I can send you an email address to send it to. |
![]() |
![]() |
![]() |
#9 |
Member
![]() Posts: 22
Karma: 10
Join Date: Jul 2012
Device: kobo
|
Hello davidfor,
thank you very much for your efforts. I have found a way around, thanks to your previous post. Instead of a form button, I have created a link to a dummy epub file, which is really a php file with a .epub extension (I had to change the .htaccess so that apache execute epubs), and this dummy epub executes the above code - and it works. Apparently it has to be a link to xxxx.epub. But since you feel like investigating further I'll do what you ask, I'd prefer not to fiddle with apache in such a silly way. Thanks again. |
![]() |
![]() |
![]() |
#10 |
Member
![]() Posts: 22
Karma: 10
Join Date: Jul 2012
Device: kobo
|
Hi Davidfor,
here's a minimal code exemplifying the problem : PHP Code:
|
![]() |
![]() |
![]() |
#11 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
That will help. But the source for the calling page is also important. Plus if I write it, I'll come up with something different to what you have.
|
![]() |
![]() |
![]() |
#12 |
Member
![]() Posts: 22
Karma: 10
Join Date: Jul 2012
Device: kobo
|
This page is the calling page. The script must be called epub_test.php. If you open this script, you'll have the button, and if you click on it, you'll download the file - or not.
|
![]() |
![]() |
![]() |
Tags |
download, epub, headers, kobo, php |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Mini Kobo Mini: can't download epub from Instapaper | hefolsom | Kobo Reader | 11 | 02-01-2013 02:42 AM |
Unable to download epub from kobo store | History | Kobo Reader | 6 | 04-26-2012 08:49 PM |
Kobo epub direct download or sideload epub | RareBird | Kobo Reader | 11 | 03-30-2012 11:19 AM |
Just me? Can't download ADE EPUB from the Kobo site | Shankill | Kobo Reader | 8 | 03-24-2012 06:31 PM |
ePub/Kobo Touch: determine which page ePub opens on? | theboyk | Conversion | 2 | 12-05-2011 10:19 AM |