From cf63033f796c947c21d2553e6e95ac6d5e1b3785 Mon Sep 17 00:00:00 2001 From: Adam Vessey Date: Thu, 20 Dec 2012 13:28:49 -0400 Subject: [PATCH] Avoid creating a temp file --- includes/datastream.inc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/includes/datastream.inc b/includes/datastream.inc index c6cb2780..74517d7c 100644 --- a/includes/datastream.inc +++ b/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(); }