diff --git a/www-api/app/Controllers/WrenchMedia.php b/www-api/app/Controllers/WrenchMedia.php index c8651722..afce1315 100644 --- a/www-api/app/Controllers/WrenchMedia.php +++ b/www-api/app/Controllers/WrenchMedia.php @@ -187,7 +187,9 @@ class WrenchMedia extends BaseController } log_message('critical', "AFTER CACHE*********"); if ($supportedSections[$fileSection] == WRENCH_FILE_CONTRACTS || $supportedSections[$fileSection] == WRENCH_FILE_MYFILE){ + log_message('critical', "FILE ************************** --->0001"); if (file_exists($selectedFile)) { + log_message('critical', "FILE ************************** --->0002"); header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename="'.basename($selectedFile).'"'); @@ -200,6 +202,7 @@ class WrenchMedia extends BaseController } exit(); } + log_message('critical', "FILE ************************** --->0003"); $filename = basename($out["saved_file_name"]); $file_extension = strtolower(substr(strrchr($filename,"."),1)); switch( $file_extension ) { @@ -218,6 +221,7 @@ class WrenchMedia extends BaseController log_message('critical', "FILE URL ===== ---> ".$local_url ); return ["aaaa"=>$local_url]; } + log_message('critical', "FILE ************************** --->0004"); header('Content-type: ' . $ctype); readfile($selectedFile); }