View Single Post
Old 08-02-2014, 09:12 AM   #7
french imp
Member
french imp began at the beginning.
 
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:
$file $_GET['file'];
$dir $_GET['dir'];
$fullPath EPUB_DIR."/$dir/$file";
header("Content-type: application/epub+zip");
header("Content-Disposition: attachment; filename=\"$file\"");
header("Expires: 0");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
readfile($fullPath);
exit(); 
where $file is the name of the file, $dir the directory where the file sits.
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.
french imp is offline   Reply With Quote