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

@ -58,7 +58,11 @@ class Data extends Base {
}
public function getMimeType () {
return self::$mimetypes [$this->extension];
if ($this->isKnownType ()) {
return self::$mimetypes [$this->extension];
} else {
return "application/octet-stream";
}
}
public function getFilename () {