Actually use the mime type.

This commit is contained in:
green-ponies (jgen) 2012-04-15 20:00:27 -04:00
parent 0c37be79a0
commit 540e82a27a
2 changed files with 2 additions and 2 deletions

View file

@ -42,7 +42,7 @@ class Featured extends Extension {
$image = Image::by_id($config->get_int("featured_id"));
if(!is_null($image)) {
$page->set_mode("data");
$page->set_type("image/jpeg");
$page->set_type($image->get_mime_type());
$page->set_data(file_get_contents($image->get_image_filename()));
}
}

View file

@ -41,7 +41,7 @@ class RandomImage extends Extension {
if($action === "download") {
if(!is_null($image)) {
$page->set_mode("data");
$page->set_type("image/jpeg");
$page->set_type($image->get_mime_type());
$page->set_data(file_get_contents($image->get_image_filename()));
}
}