Skip to content

Commit

Permalink
Adding check for MIME type
Browse files Browse the repository at this point in the history
  • Loading branch information
Kylea Jackson committed Apr 2, 2015
1 parent a226493 commit da57037
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion includes/derivatives.inc
Expand Up @@ -388,7 +388,9 @@ function islandora_pdf_add_datastream($object, $datastream_id, $file_uri) {
else {
$ds = $object[$datastream_id];
}
$ds->mimetype = $mime_detector->getMimetype($file_uri);
if ($ds->mimetype != $mime_detector->getMimetype($file_uri)) {
$ds->mimetype = $mime_detector->getMimetype($file_uri);
}
$ds->setContentFromFile(drupal_realpath($file_uri), FALSE);
if ($ingest) {
$object->ingestDatastream($ds);
Expand Down

0 comments on commit da57037

Please sign in to comment.