Browse Source

Merge pull request #226 from adam-vessey/7.x

Avoid creating a temp file
pull/227/merge
Jonathan Green 12 years ago
parent
commit
7fafe82388
  1. 5
      includes/datastream.inc

5
includes/datastream.inc

@ -41,10 +41,7 @@ function islandora_view_datastream(FedoraDatastream $datastream, $download = FAL
}
drupal_page_is_cacheable(FALSE);
// Try not to load the file into PHP memory!
$file = drupal_tempnam(file_directory_temp(), 'islandora');
$datastream->getContent($file);
readfile($file);
drupal_unlink($file);
$datastream->getContent('php://output');
exit();
}

Loading…
Cancel
Save