upload control
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user