Better handling of content type for book. Reported by Morg.

This commit is contained in:
Sébastien Lucas 2012-12-23 13:42:53 +01:00
parent 67f1a53ba2
commit 38b61c89da
3 changed files with 23 additions and 11 deletions

View file

@ -87,7 +87,7 @@
break;
}
$file = $book->getFilePath ($type, $idData, true);
header('Content-Type: application/octet-stream');
header('Content-Type: ' . $book->getDataById ($idData)->getMimeType ());
header('Content-Disposition: attachment; filename="' . basename ($file) . '"');
header ($config['cops_x_accel_redirect'] . ": " . $config['calibre_internal_directory'] . $file);
?>