Better handling of book format inside Calibre.
Not tested enough
This commit is contained in:
parent
b2f34f428f
commit
9a8e9bacae
2 changed files with 36 additions and 19 deletions
|
@ -17,6 +17,7 @@
|
|||
$bookId = $_GET["id"];
|
||||
$book = Book::getBookById($bookId);
|
||||
$type = getURLParam ("type", "jpg");
|
||||
$idData = getURLParam ("data", NULL);
|
||||
|
||||
switch ($type)
|
||||
{
|
||||
|
@ -77,7 +78,7 @@
|
|||
header("Content-type: " . Book::$mimetypes[$type]);
|
||||
break;
|
||||
}
|
||||
$file = $book->getFilePath ($type, true);
|
||||
$file = $book->getFilePath ($type, $idData, true);
|
||||
header('Content-Disposition: attachement; filename="' . basename ($file) . '"');
|
||||
header ($config['cops_x_accel_redirect'] . ": " . $config['calibre_internal_directory'] . $file);
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue