From 9d19777234054d92e336027d89fe529aa6291a3c Mon Sep 17 00:00:00 2001 From: David Mudrak Date: Sat, 12 May 2012 16:20:40 +0200 Subject: [PATCH] MDL-31901 draftfile.php supports the preview parameter --- draftfile.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/draftfile.php b/draftfile.php index baeceaf7af762..ede5706913491 100644 --- a/draftfile.php +++ b/draftfile.php @@ -36,6 +36,7 @@ } $relativepath = get_file_argument(); +$preview = optional_param('preview', null, PARAM_ALPHANUM); // relative path must start with '/' if (!$relativepath) { @@ -84,4 +85,4 @@ // finally send the file // ======================================== session_get_instance()->write_close(); // unlock session during fileserving -send_stored_file($file, 0, false, true); // force download - security first! +send_stored_file($file, 0, false, true, array('preview' => $preview)); // force download - security first!