@@ -438,13 +438,13 @@ |
||
| 438 | 438 | if ($this->getVisitCharacteristics()->reviewNeeded) { |
| 439 | 439 | //If review needed make it available for reviewers |
| 440 | 440 | $this->changeReviewAvailability(true); |
| 441 | - }else if( ! $this->getVisitCharacteristics()->qcNeeded) { |
|
| 441 | + }else if (!$this->getVisitCharacteristics()->qcNeeded) { |
|
| 442 | 442 | //The visit is QC accepted and will not go further as Review is not needed |
| 443 | 443 | //Inform supervisors that the visit is well recieved |
| 444 | 444 | //Do this only if QC is not needed as supervisor will get QC notification otherwise (avoid dual mail) |
| 445 | 445 | $this->sendUploadNotificationToSupervisor(); |
| 446 | 446 | } |
| 447 | - }else if ($controlDecision == Visit::QC_REFUSED){ |
|
| 447 | + }else if ($controlDecision == Visit::QC_REFUSED) { |
|
| 448 | 448 | $this->changeReviewAvailability(false); |
| 449 | 449 | } |
| 450 | 450 | |
@@ -369,13 +369,16 @@ discard block |
||
| 369 | 369 | $filteredReview=array_filter($reviewsObjects, function($review) use ($username) { |
| 370 | 370 | if ($review->username == $username) { |
| 371 | 371 | return true; |
| 372 | - }else { |
|
| 372 | + } else { |
|
| 373 | 373 | return false; |
| 374 | 374 | } |
| 375 | 375 | }); |
| 376 | 376 | $filteredReview=array_values($filteredReview); |
| 377 | - if (sizeof($filteredReview) == 1) return $filteredReview[0]; |
|
| 378 | - else throw new Exception('No review for reviwer'); |
|
| 377 | + if (sizeof($filteredReview) == 1) { |
|
| 378 | + return $filteredReview[0]; |
|
| 379 | + } else { |
|
| 380 | + throw new Exception('No review for reviwer'); |
|
| 381 | + } |
|
| 379 | 382 | |
| 380 | 383 | } |
| 381 | 384 | |
@@ -394,7 +397,7 @@ discard block |
||
| 394 | 397 | |
| 395 | 398 | if (empty($dataVisits)) { |
| 396 | 399 | return true; |
| 397 | - }else { |
|
| 400 | + } else { |
|
| 398 | 401 | return false; |
| 399 | 402 | } |
| 400 | 403 | |
@@ -438,13 +441,13 @@ discard block |
||
| 438 | 441 | if ($this->getVisitCharacteristics()->reviewNeeded) { |
| 439 | 442 | //If review needed make it available for reviewers |
| 440 | 443 | $this->changeReviewAvailability(true); |
| 441 | - }else if( ! $this->getVisitCharacteristics()->qcNeeded) { |
|
| 444 | + } else if( ! $this->getVisitCharacteristics()->qcNeeded) { |
|
| 442 | 445 | //The visit is QC accepted and will not go further as Review is not needed |
| 443 | 446 | //Inform supervisors that the visit is well recieved |
| 444 | 447 | //Do this only if QC is not needed as supervisor will get QC notification otherwise (avoid dual mail) |
| 445 | 448 | $this->sendUploadNotificationToSupervisor(); |
| 446 | 449 | } |
| 447 | - }else if ($controlDecision == Visit::QC_REFUSED){ |
|
| 450 | + } else if ($controlDecision == Visit::QC_REFUSED){ |
|
| 448 | 451 | $this->changeReviewAvailability(false); |
| 449 | 452 | } |
| 450 | 453 | |
@@ -587,7 +590,7 @@ discard block |
||
| 587 | 590 | require_once($specificObjectFile); |
| 588 | 591 | $objectName=$modality."_".$this->study."_".$this->visitType; |
| 589 | 592 | $formProcessor=new $objectName($this, $local, $username, $this->linkpdo); |
| 590 | - }else { |
|
| 593 | + } else { |
|
| 591 | 594 | throw new Exception('Missing From Processor for this visit'); |
| 592 | 595 | } |
| 593 | 596 | |
@@ -619,7 +622,7 @@ discard block |
||
| 619 | 622 | |
| 620 | 623 | return true; |
| 621 | 624 | |
| 622 | - }else { |
|
| 625 | + } else { |
|
| 623 | 626 | return false; |
| 624 | 627 | } |
| 625 | 628 | } |
@@ -659,7 +662,7 @@ discard block |
||
| 659 | 662 | |
| 660 | 663 | try { |
| 661 | 664 | $reviewObject=$this->queryExistingReviewForReviewer($username); |
| 662 | - }catch (Exception $e) { |
|
| 665 | + } catch (Exception $e) { |
|
| 663 | 666 | //User does not have any review, so visit still awaiting it's review |
| 664 | 667 | return true; |
| 665 | 668 | } |
@@ -668,7 +671,7 @@ discard block |
||
| 668 | 671 | //not awaiting review if form already validated |
| 669 | 672 | if ($reviewObject->validated) { |
| 670 | 673 | return false; |
| 671 | - }else { |
|
| 674 | + } else { |
|
| 672 | 675 | return true; |
| 673 | 676 | } |
| 674 | 677 | |
@@ -20,137 +20,137 @@ |
||
| 20 | 20 | if (!isset($_GET['page'])) {
|
| 21 | 21 | require 'controllers/index_controller.php'; |
| 22 | 22 | |
| 23 | -}else if ($_GET['page'] == 'controller_form') {
|
|
| 23 | +} else if ($_GET['page'] == 'controller_form') {
|
|
| 24 | 24 | require 'controllers/investigator/controller_form_controller.php'; |
| 25 | 25 | |
| 26 | -}else if ($_GET['page'] == 'corrective_action') {
|
|
| 26 | +} else if ($_GET['page'] == 'corrective_action') {
|
|
| 27 | 27 | require 'controllers/investigator/corrective_action_controller.php'; |
| 28 | 28 | |
| 29 | -}else if ($_GET['page'] == 'root_investigator') {
|
|
| 29 | +} else if ($_GET['page'] == 'root_investigator') {
|
|
| 30 | 30 | require 'controllers/investigator/root_investigator_controller.php'; |
| 31 | 31 | |
| 32 | -}else if ($_GET['page'] == 'documentation') {
|
|
| 32 | +} else if ($_GET['page'] == 'documentation') {
|
|
| 33 | 33 | require 'controllers/investigator/documentation_controller.php'; |
| 34 | 34 | |
| 35 | -}else if ($_GET['page'] == 'patient_interface') {
|
|
| 35 | +} else if ($_GET['page'] == 'patient_interface') {
|
|
| 36 | 36 | require 'controllers/investigator/patient_interface_controller.php'; |
| 37 | 37 | |
| 38 | -}else if ($_GET['page'] == 'ask_unlock') {
|
|
| 38 | +} else if ($_GET['page'] == 'ask_unlock') {
|
|
| 39 | 39 | require 'controllers/investigator/ask_unlock_controller.php'; |
| 40 | 40 | |
| 41 | -}else if ($_GET['page'] == 'visit_interface') {
|
|
| 41 | +} else if ($_GET['page'] == 'visit_interface') {
|
|
| 42 | 42 | require 'controllers/investigator/visit_interface_controller.php'; |
| 43 | 43 | |
| 44 | -}else if ($_GET['page'] == 'new_visit') {
|
|
| 44 | +} else if ($_GET['page'] == 'new_visit') {
|
|
| 45 | 45 | require 'controllers/investigator/new_visit_controller.php'; |
| 46 | 46 | |
| 47 | -}else if ($_GET['page'] == 'specific_form') {
|
|
| 47 | +} else if ($_GET['page'] == 'specific_form') {
|
|
| 48 | 48 | require 'controllers/investigator/specific_form_controller.php'; |
| 49 | 49 | |
| 50 | -}else if ($_GET['page'] == 'administrator') {
|
|
| 50 | +} else if ($_GET['page'] == 'administrator') {
|
|
| 51 | 51 | require 'controllers/administrator/root_administrator_controller.php'; |
| 52 | 52 | |
| 53 | -}else if ($_GET['page'] == 'study_activation') {
|
|
| 53 | +} else if ($_GET['page'] == 'study_activation') {
|
|
| 54 | 54 | require 'controllers/administrator/study_activation_controller.php'; |
| 55 | 55 | |
| 56 | -}else if ($_GET['page'] == 'modify_centers') {
|
|
| 56 | +} else if ($_GET['page'] == 'modify_centers') {
|
|
| 57 | 57 | require 'controllers/administrator/modify_centers_controller.php'; |
| 58 | 58 | |
| 59 | -}else if ($_GET['page'] == 'preferences') {
|
|
| 59 | +} else if ($_GET['page'] == 'preferences') {
|
|
| 60 | 60 | require 'controllers/administrator/preferences_controller.php'; |
| 61 | 61 | |
| 62 | -}else if ($_GET['page'] == 'user_table') {
|
|
| 62 | +} else if ($_GET['page'] == 'user_table') {
|
|
| 63 | 63 | require 'controllers/administrator/user_table_controller.php'; |
| 64 | 64 | |
| 65 | -}else if ($_GET['page'] == 'new_user') {
|
|
| 65 | +} else if ($_GET['page'] == 'new_user') {
|
|
| 66 | 66 | require 'controllers/administrator/new_user_controller.php'; |
| 67 | 67 | |
| 68 | -}else if ($_GET['page'] == 'modify_user') {
|
|
| 68 | +} else if ($_GET['page'] == 'modify_user') {
|
|
| 69 | 69 | require 'controllers/administrator/modify_user_controller.php'; |
| 70 | 70 | |
| 71 | -}else if ($_GET['page'] == 'my_account') {
|
|
| 71 | +} else if ($_GET['page'] == 'my_account') {
|
|
| 72 | 72 | require 'controllers/my_account_controller.php'; |
| 73 | 73 | |
| 74 | -}else if ($_GET['page'] == 'export_database') {
|
|
| 74 | +} else if ($_GET['page'] == 'export_database') {
|
|
| 75 | 75 | require 'controllers/administrator/export_database_controller.php'; |
| 76 | 76 | |
| 77 | -}else if ($_GET['page'] == 'tracker_user') {
|
|
| 77 | +} else if ($_GET['page'] == 'tracker_user') {
|
|
| 78 | 78 | require 'controllers/administrator/tracker_user_controller.php'; |
| 79 | 79 | |
| 80 | -}else if ($_GET['page'] == 'tracker_admin') {
|
|
| 80 | +} else if ($_GET['page'] == 'tracker_admin') {
|
|
| 81 | 81 | require 'controllers/administrator/tracker_admin_controller.php'; |
| 82 | 82 | |
| 83 | -}else if ($_GET['page'] == 'create_study') {
|
|
| 83 | +} else if ($_GET['page'] == 'create_study') {
|
|
| 84 | 84 | require 'controllers/administrator/create_study_controller.php'; |
| 85 | 85 | |
| 86 | -}else if ($_GET['page'] == 'visit_builder') {
|
|
| 86 | +} else if ($_GET['page'] == 'visit_builder') {
|
|
| 87 | 87 | require 'controllers/administrator/visit_builder_controller.php'; |
| 88 | 88 | |
| 89 | -}else if ($_GET['page'] == 'preferences') {
|
|
| 89 | +} else if ($_GET['page'] == 'preferences') {
|
|
| 90 | 90 | require 'controllers/administrator/preferences_controller.php'; |
| 91 | 91 | |
| 92 | -}else if ($_GET['page'] == 'change_patient_status') {
|
|
| 92 | +} else if ($_GET['page'] == 'change_patient_status') {
|
|
| 93 | 93 | require 'controllers/supervisor/change_patient_status_controller.php'; |
| 94 | 94 | |
| 95 | -}else if ($_GET['page'] == 'documentation_supervisor') {
|
|
| 95 | +} else if ($_GET['page'] == 'documentation_supervisor') {
|
|
| 96 | 96 | require 'controllers/supervisor/documentation_controller.php'; |
| 97 | 97 | |
| 98 | -}else if ($_GET['page'] == 'documentation_upload') {
|
|
| 98 | +} else if ($_GET['page'] == 'documentation_upload') {
|
|
| 99 | 99 | require 'controllers/supervisor/documentation_upload_controller.php'; |
| 100 | 100 | |
| 101 | -}else if ($_GET['page'] == 'users_details') {
|
|
| 101 | +} else if ($_GET['page'] == 'users_details') {
|
|
| 102 | 102 | require 'controllers/supervisor/users_details_controller.php'; |
| 103 | 103 | |
| 104 | -}else if ($_GET['page'] == 'import_patients') {
|
|
| 104 | +} else if ($_GET['page'] == 'import_patients') {
|
|
| 105 | 105 | require 'controllers/supervisor/import_patients_controller.php'; |
| 106 | 106 | |
| 107 | -}else if ($_GET['page'] == 'patient_infos') {
|
|
| 107 | +} else if ($_GET['page'] == 'patient_infos') {
|
|
| 108 | 108 | require 'controllers/supervisor/patient_infos_controller.php'; |
| 109 | 109 | |
| 110 | -}else if ($_GET['page'] == 'visit_infos') {
|
|
| 110 | +} else if ($_GET['page'] == 'visit_infos') {
|
|
| 111 | 111 | require 'controllers/supervisor/visit_infos_controller.php'; |
| 112 | 112 | |
| 113 | -}else if ($_GET['page'] == 'root_supervisor') {
|
|
| 113 | +} else if ($_GET['page'] == 'root_supervisor') {
|
|
| 114 | 114 | require 'controllers/supervisor/supervisor_root_controller.php'; |
| 115 | 115 | |
| 116 | -}else if ($_GET['page'] == 'upload_manager') {
|
|
| 116 | +} else if ($_GET['page'] == 'upload_manager') {
|
|
| 117 | 117 | require 'controllers/supervisor/upload_manager_controller.php'; |
| 118 | 118 | |
| 119 | -}else if ($_GET['page'] == 'review_manager') {
|
|
| 119 | +} else if ($_GET['page'] == 'review_manager') {
|
|
| 120 | 120 | require 'controllers/supervisor/review_manager_controller.php'; |
| 121 | 121 | |
| 122 | -}else if ($_GET['page'] == 'download_manager') {
|
|
| 122 | +} else if ($_GET['page'] == 'download_manager') {
|
|
| 123 | 123 | require 'controllers/supervisor/download_manager_controller.php'; |
| 124 | 124 | |
| 125 | -}else if ($_GET['page'] == 'tracker') {
|
|
| 125 | +} else if ($_GET['page'] == 'tracker') {
|
|
| 126 | 126 | require 'controllers/supervisor/tracker_controller.php'; |
| 127 | 127 | |
| 128 | -}else if ($_GET['page'] == 'statistics') {
|
|
| 128 | +} else if ($_GET['page'] == 'statistics') {
|
|
| 129 | 129 | require 'controllers/supervisor/statistics_controller.php'; |
| 130 | 130 | |
| 131 | -}else if ($_GET['page'] == 'change_password') {
|
|
| 131 | +} else if ($_GET['page'] == 'change_password') {
|
|
| 132 | 132 | require 'controllers/change_password_controller.php'; |
| 133 | 133 | |
| 134 | -}else if ($_GET['page'] == 'forgot_password') {
|
|
| 134 | +} else if ($_GET['page'] == 'forgot_password') {
|
|
| 135 | 135 | require 'controllers/forgot_password_controller.php'; |
| 136 | 136 | |
| 137 | -}else if ($_GET['page'] == 'request') {
|
|
| 137 | +} else if ($_GET['page'] == 'request') {
|
|
| 138 | 138 | require 'controllers/request_controller.php'; |
| 139 | 139 | |
| 140 | -}else if ($_GET['page'] == 'messenger') {
|
|
| 140 | +} else if ($_GET['page'] == 'messenger') {
|
|
| 141 | 141 | require 'controllers/messenger_controller.php'; |
| 142 | 142 | |
| 143 | -}else if ($_GET['page'] == 'main') {
|
|
| 143 | +} else if ($_GET['page'] == 'main') {
|
|
| 144 | 144 | require 'controllers/main_controller.php'; |
| 145 | 145 | |
| 146 | -}else if (strpos($_GET['page'], 'orthanc') === 0) {
|
|
| 146 | +} else if (strpos($_GET['page'], 'orthanc') === 0) {
|
|
| 147 | 147 | //Start with Orthanc to reach orthanc |
| 148 | 148 | require 'scripts/dicom_web.php'; |
| 149 | 149 | |
| 150 | -}else if (strpos($_GET['page'], 'tus') === 0) {
|
|
| 150 | +} else if (strpos($_GET['page'], 'tus') === 0) {
|
|
| 151 | 151 | //tus subrouter |
| 152 | 152 | require 'scripts/tus_upload.php'; |
| 153 | 153 | |
| 154 | -}else {
|
|
| 154 | +} else {
|
|
| 155 | 155 | require 'includes/404.php'; |
| 156 | 156 | } |
| 157 | 157 | \ No newline at end of file |
@@ -178,11 +178,11 @@ |
||
| 178 | 178 | continue; |
| 179 | 179 | } |
| 180 | 180 | $files[]=$file->getPathname(); |
| 181 | - } |
|
| 181 | + } |
|
| 182 | 182 | |
| 183 | - if(sizeof($files) != $nbOfInstances){ |
|
| 184 | - throw new Exception("Number Of Uploaded Files dosen't match expected instance number"); |
|
| 185 | - } |
|
| 183 | + if(sizeof($files) != $nbOfInstances){ |
|
| 184 | + throw new Exception("Number Of Uploaded Files dosen't match expected instance number"); |
|
| 185 | + } |
|
| 186 | 186 | |
| 187 | 187 | $importedMap=null; |
| 188 | 188 | $importedInstances=0; |
@@ -35,15 +35,15 @@ discard block |
||
| 35 | 35 | Session::checkSession(); |
| 36 | 36 | $linkpdo=Session::getLinkpdo(); |
| 37 | 37 | |
| 38 | -$timeStamp = $_POST['timeStamp']; |
|
| 39 | -$id_visit = $_POST['id_visit']; |
|
| 40 | -$nbOfInstances = $_POST['totalDicomFiles']; |
|
| 38 | +$timeStamp=$_POST['timeStamp']; |
|
| 39 | +$id_visit=$_POST['id_visit']; |
|
| 40 | +$nbOfInstances=$_POST['totalDicomFiles']; |
|
| 41 | 41 | $anonFromOrthancId=$_POST['originalOrthancStudyID']; |
| 42 | 42 | $username=$_SESSION['username']; |
| 43 | 43 | $study=$_SESSION['study']; |
| 44 | 44 | $role=$_SESSION['role']; |
| 45 | 45 | |
| 46 | -$unzipedPath = $_SERVER['DOCUMENT_ROOT'].'/data/upload/temp/'.$timeStamp.'_'.$id_visit; |
|
| 46 | +$unzipedPath=$_SERVER['DOCUMENT_ROOT'].'/data/upload/temp/'.$timeStamp.'_'.$id_visit; |
|
| 47 | 47 | |
| 48 | 48 | $visitObject=new Visit($id_visit, $linkpdo); |
| 49 | 49 | $userObject=new User($username, $linkpdo); |
@@ -74,15 +74,15 @@ discard block |
||
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | \TusPhp\Config::set($_SERVER['DOCUMENT_ROOT'].'/data/_config/tus_server.php'); |
| 77 | - $server = new \TusPhp\Tus\Server(); |
|
| 77 | + $server=new \TusPhp\Tus\Server(); |
|
| 78 | 78 | |
| 79 | - $tusCache = $server->getCache(); |
|
| 79 | + $tusCache=$server->getCache(); |
|
| 80 | 80 | |
| 81 | - $cacheContent = $tusCache->getCacheContents(); |
|
| 81 | + $cacheContent=$tusCache->getCacheContents(); |
|
| 82 | 82 | |
| 83 | - foreach($cacheContent as $key => $uploadObject){ |
|
| 83 | + foreach ($cacheContent as $key => $uploadObject) { |
|
| 84 | 84 | |
| 85 | - if($uploadObject['metadata']['idVisit'] == $id_visit){ |
|
| 85 | + if ($uploadObject['metadata']['idVisit'] == $id_visit) { |
|
| 86 | 86 | |
| 87 | 87 | $zipSize=filesize($uploadObject['file_path']); |
| 88 | 88 | $uncompressedzipSize=get_zip_originalsize($uploadObject['file_path']); |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | $files[]=$file->getPathname(); |
| 181 | 181 | } |
| 182 | 182 | |
| 183 | - if(sizeof($files) != $nbOfInstances){ |
|
| 183 | + if (sizeof($files) != $nbOfInstances) { |
|
| 184 | 184 | throw new Exception("Number Of Uploaded Files dosen't match expected instance number"); |
| 185 | 185 | } |
| 186 | 186 | |
@@ -29,8 +29,8 @@ |
||
| 29 | 29 | //Define action and timing |
| 30 | 30 | |
| 31 | 31 | //Execute each hour TUS script to remove expired incomplete upload |
| 32 | -$tusConfigFile = dirname(__DIR__, 1).'/data/_config/tus_server.php'; |
|
| 33 | -$rootPath = dirname(__DIR__, 2); |
|
| 32 | +$tusConfigFile=dirname(__DIR__, 1).'/data/_config/tus_server.php'; |
|
| 33 | +$rootPath=dirname(__DIR__, 2); |
|
| 34 | 34 | $scheduler->raw($rootPath.'/vendor/bin/tus tus:expired --config='.$tusConfigFile)->hourly()->output('/var/log/tus_cron.log'); |
| 35 | 35 | |
| 36 | 36 | |
@@ -2,20 +2,20 @@ |
||
| 2 | 2 | |
| 3 | 3 | return [ |
| 4 | 4 | |
| 5 | - /** |
|
| 6 | - * Redis connection parameters. |
|
| 7 | - */ |
|
| 8 | - 'redis' => [ |
|
| 9 | - 'host' => getenv('REDIS_HOST') !== false ? getenv('REDIS_HOST') : '127.0.0.1', |
|
| 10 | - 'port' => getenv('REDIS_PORT') !== false ? getenv('REDIS_PORT') : '6379', |
|
| 11 | - 'database' => getenv('REDIS_DB') !== false ? getenv('REDIS_DB') : 0, |
|
| 12 | - ], |
|
| 5 | + /** |
|
| 6 | + * Redis connection parameters. |
|
| 7 | + */ |
|
| 8 | + 'redis' => [ |
|
| 9 | + 'host' => getenv('REDIS_HOST') !== false ? getenv('REDIS_HOST') : '127.0.0.1', |
|
| 10 | + 'port' => getenv('REDIS_PORT') !== false ? getenv('REDIS_PORT') : '6379', |
|
| 11 | + 'database' => getenv('REDIS_DB') !== false ? getenv('REDIS_DB') : 0, |
|
| 12 | + ], |
|
| 13 | 13 | |
| 14 | - /** |
|
| 15 | - * File cache configs. |
|
| 16 | - */ |
|
| 17 | - 'file' => [ |
|
| 18 | - 'dir' => $_SERVER['DOCUMENT_ROOT'].'/data/upload' . DIRECTORY_SEPARATOR . '.cache' . DIRECTORY_SEPARATOR, |
|
| 19 | - 'name' => 'tus_php.server.cache', |
|
| 20 | - ], |
|
| 14 | + /** |
|
| 15 | + * File cache configs. |
|
| 16 | + */ |
|
| 17 | + 'file' => [ |
|
| 18 | + 'dir' => $_SERVER['DOCUMENT_ROOT'].'/data/upload' . DIRECTORY_SEPARATOR . '.cache' . DIRECTORY_SEPARATOR, |
|
| 19 | + 'name' => 'tus_php.server.cache', |
|
| 20 | + ], |
|
| 21 | 21 | ]; |
| 22 | 22 | \ No newline at end of file |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | * File cache configs. |
| 16 | 16 | */ |
| 17 | 17 | 'file' => [ |
| 18 | - 'dir' => $_SERVER['DOCUMENT_ROOT'].'/data/upload' . DIRECTORY_SEPARATOR . '.cache' . DIRECTORY_SEPARATOR, |
|
| 18 | + 'dir' => $_SERVER['DOCUMENT_ROOT'].'/data/upload'.DIRECTORY_SEPARATOR.'.cache'.DIRECTORY_SEPARATOR, |
|
| 19 | 19 | 'name' => 'tus_php.server.cache', |
| 20 | 20 | ], |
| 21 | 21 | ]; |
| 22 | 22 | \ No newline at end of file |
@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | define('UPLOADS_DIR', $_SERVER['DOCUMENT_ROOT'].'/data/upload/temp'); |
| 10 | 10 | |
| 11 | 11 | \TusPhp\Config::set($_SERVER['DOCUMENT_ROOT'].'/data/_config/tus_server.php'); |
| 12 | -$server = new \TusPhp\Tus\Server(); //Either redis, file or apcu. Leave empty for file based cache. |
|
| 12 | +$server=new \TusPhp\Tus\Server(); //Either redis, file or apcu. Leave empty for file based cache. |
|
| 13 | 13 | $server->setUploadDir(UPLOADS_DIR); |
| 14 | 14 | //Overring the 'file' default root path by 'tus' |
| 15 | 15 | $server->setApiPath('/tus'); |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | $server->getRequest()->getRequest()->setTrustedProxies(['127.0.0.1', 'REMOTE_ADDR'], Request::HEADER_X_FORWARDED_ALL); |
| 18 | 18 | |
| 19 | 19 | |
| 20 | -$response = $server->serve(); |
|
| 20 | +$response=$server->serve(); |
|
| 21 | 21 | |
| 22 | 22 | $response->send(); |
| 23 | 23 | |