Skip to content

Commit

Permalink
Fix displaying file immediately after upload.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Jan 7, 2016
1 parent 001476a commit 684e774
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion kronolith/viewer.php
Expand Up @@ -47,7 +47,12 @@
}

$mime_part = new Horde_Mime_Part();
$mime_part->setType(Horde_Mime_Magic::extToMime($type));
// $type might already be a mime_type.
if (strpos($type, '/')) {
$mime_part->setType($type);
} else {
$mime_part->setType(Horde_Mime_Magic::extToMime($type));
}
$mime_part->setContents($data);
$mime_part->setName($filename);
$mime_part->buildMimeIds();
Expand Down

0 comments on commit 684e774

Please sign in to comment.