From 8d321a238d07e642966ac3dc904e957d88bc2b11 Mon Sep 17 00:00:00 2001 From: Sashi20 Date: Thu, 16 Jul 2020 18:12:35 +0530 Subject: Modify headers to download flowsheet certificate --- download.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'download.inc') diff --git a/download.inc b/download.inc index 5dfb9ef..d8a6839 100755 --- a/download.inc +++ b/download.inc @@ -24,7 +24,7 @@ function dwsim_flowsheet_download_abstract() { $query = db_select('dwsim_flowsheet_submitted_abstracts_file'); $query->fields('dwsim_flowsheet_submitted_abstracts_file'); $query->condition('proposal_id', $proposal_id); - $query->condition('filetype', A); + $query->condition('filetype', 'A'); $result = $query->execute(); $flowsheet_project_files = $result->fetchObject(); //var_dump($custom_model_project_files);die; @@ -43,7 +43,7 @@ function dwsim_flowsheet_download_abstract() { header("Content-Description: File Transfer"); header("Content-Type: application/pdf"); header('Content-disposition: attachment; filename="' . $samplecodename . '"'); - header("Content-Length: " . filesize($root_path . $directory_name . $samplecodename)); + header("Content-Length: " . filesize($root_path . $directory_name . '/' . $samplecodename)); header("Content-Transfer-Encoding: binary"); header("Expires: 0"); header("Pragma: no-cache"); -- cgit