Filer uploads

This commit is contained in:
CHIEFSOFT\ameye
2023-06-01 12:43:58 -04:00
parent 66af574c17
commit 0c5660de1f
2 changed files with 13 additions and 0 deletions
+7
View File
@@ -463,6 +463,13 @@ class WrenchApi extends BaseController
'URI' => $uri,
]);
}
if ($_SERVER["REQUEST_METHOD"] == "POST") {
if (isset($_FILES) && is_array($_FILES) && count($_FILES)>0) {
$raw_array = array_merge($_POST,$_FILES);
}
}
// echo "EXYTACT INPUT DATA HERE";
$raw_json = file_get_contents('php://input');
$raw_array = json_decode($raw_json, true);
+6
View File
@@ -132,6 +132,12 @@ if (array_search($_SERVER['REQUEST_METHOD'], $methods) === false) {
exit();
}
if ($_SERVER["REQUEST_METHOD"] == "POST") {
if (isset($_FILES) && is_array($_FILES) && count($_FILES)>0) {
$in = array_merge($_POST,$_FILES);
}
}
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$in = flatten(json_decode(file_get_contents('php://input'), true));
}