diff --git a/www-api/app/Controllers/WrenchApi.php b/www-api/app/Controllers/WrenchApi.php index 700149ec..9b8f5849 100644 --- a/www-api/app/Controllers/WrenchApi.php +++ b/www-api/app/Controllers/WrenchApi.php @@ -413,6 +413,7 @@ class WrenchApi extends BaseController log_message('critical', "0001"); header('Access-Control-Allow-Origin: *'); log_message('critical', "0002"); + $call_backend = true; /* //header("Access-Control-Allow-Origin: http://localhost:9057 "); header('Access-Control-Expose-Headers: Access-Control-Allow-Origin'); @@ -465,6 +466,10 @@ class WrenchApi extends BaseController } if ($_SERVER["REQUEST_METHOD"] == "POST") { + if ( $endpoint == 'uploads'){ + $local_out=["test_msg"=>'Yes the upload endpoinmt was hit********']; + $call_backend = false; // will be decided after file is saved + } if (isset($_FILES) && is_array($_FILES) && count($_FILES)>0) { $raw_array = array_merge($_POST,$_FILES); } @@ -482,7 +487,7 @@ class WrenchApi extends BaseController //$in = $raw_array; log_message('critical', "wrenchboard_api-CALL RAW DATA".serialize($raw_array) ); //-- move to another module start - $call_backend = true; + $local_out =[]; $in["loc"] = $_SERVER["REMOTE_ADDR"]; $in = $this->prepareEndPointData($endpoint, $raw_array,$call_backend,$local_out); diff --git a/www-api/public/svs/user/userve.php b/www-api/public/svs/user/userve.php index 98cd7070..5b234f7b 100755 --- a/www-api/public/svs/user/userve.php +++ b/www-api/public/svs/user/userve.php @@ -133,6 +133,11 @@ if (array_search($_SERVER['REQUEST_METHOD'], $methods) === false) { } if ($_SERVER["REQUEST_METHOD"] == "POST") { + if ( $endpoint == 'uploads'){ + $local_out=["test_msg"=>'Yes the upload endpoinmt was hit******** 777']; + $call_backend = false; // will be decided after file is saved + } + $call_backend = false; if (isset($_FILES) && is_array($_FILES) && count($_FILES)>0) { $in = array_merge($_POST,$_FILES); }