diff --git a/fetch.php b/fetch.php index c3bedbf..6bcccf1 100644 --- a/fetch.php +++ b/fetch.php @@ -69,7 +69,8 @@ function notFound () { } break; default: - header("Content-Type: " . Data::$mimetypes[$type]); + $data = $book->getDataById ($idData); + header("Content-Type: " . $data->getMimeType ()); break; } $file = $book->getFilePath ($type, $idData, true);