From 38db05a5ba70000d1a8f0aeb441ed3c87efd718e Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Mon, 19 Jun 2023 09:48:54 -0400 Subject: [PATCH] Post upload data --- www-api/app/Controllers/WrenchApi.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/www-api/app/Controllers/WrenchApi.php b/www-api/app/Controllers/WrenchApi.php index 114e3ada..f4d4e276 100644 --- a/www-api/app/Controllers/WrenchApi.php +++ b/www-api/app/Controllers/WrenchApi.php @@ -505,9 +505,15 @@ class WrenchApi extends BaseController 'URI' => $uri, ]); } + + // echo "EXYTACT INPUT DATA HERE"; + $raw_json = file_get_contents('php://input'); + $raw_array = json_decode($raw_json, true); + $local_out =[]; - if ($_SERVER["REQUEST_METHOD"] == "POST") { + if ($_SERVER["REQUEST_METHOD"] == "POST") { // if upload lets modify all the data if ( $endpoint == 'uploads'){ + log_message('critical', "ENDPOINT TESTING UPLOAD-> ".$endpoint ); $local_out=["test_msg"=>'Yes the upload endpoint was hit********']; $call_backend = false; // will be decided after file is saved //$fl_in=[]; @@ -524,10 +530,6 @@ class WrenchApi extends BaseController } } - // echo "EXYTACT INPUT DATA HERE"; - $raw_json = file_get_contents('php://input'); - $raw_array = json_decode($raw_json, true); - if ($_SERVER['REQUEST_METHOD'] == 'GET') { log_message('critical', "Enpoint LOC2 HERE -> ".$endpoint ); $get_param = $_GET['reqData'] ?? null;