From d1e02e6aa2f75a311c46a465bc044211edb36ed9 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Wed, 1 Jul 2009 00:29:30 +0000 Subject: fix to support inline if the view is specified - could be used by rss feeds or slideshows --- actions/download.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'actions/download.php') diff --git a/actions/download.php b/actions/download.php index 3b39c831d..2736e5438 100644 --- a/actions/download.php +++ b/actions/download.php @@ -9,12 +9,17 @@ $file_guid = (int) get_input("file_guid"); $file = get_entity($file_guid); + $view = get_input("view"); + if ($file) { $filename = $file->originalfilename; $mime = $file->mimetype; header("Content-type: $mime"); - header("Content-Disposition: attachment; filename=\"$filename\""); + if ($view == "inline") + header("Content-Disposition: inline; filename=\"$filename\""); + else + header("Content-Disposition: attachment; filename=\"$filename\""); $readfile = new ElggFile($file_guid); -- cgit v1.2.3