From 738556f4e112d28f90c75c3bb740af1dad3968d7 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Fri, 2 Jun 2023 12:56:24 -0400 Subject: [PATCH] uploasd data --- www-api/app/Controllers/WrenchApi.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/www-api/app/Controllers/WrenchApi.php b/www-api/app/Controllers/WrenchApi.php index b4b4e99c..c500d9ca 100644 --- a/www-api/app/Controllers/WrenchApi.php +++ b/www-api/app/Controllers/WrenchApi.php @@ -469,11 +469,13 @@ class WrenchApi extends BaseController if ( $endpoint == 'uploads'){ $local_out=["test_msg"=>'Yes the upload endpoint was hit********']; $call_backend = false; // will be decided after file is saved - $fl_in=[]; - $ll = ( new \App\Models\UploadManager() )->reciveUpload($fl_in, $local_out); + //$fl_in=[]; + $raw_json = file_get_contents('php://input'); + $raw_array = json_decode($raw_json, true); + $ll = ( new \App\Models\UploadManager() )->reciveUpload($raw_array, $local_out); } - if (isset($_FILES) && is_array($_FILES) && count($_FILES)>0) { + if (isset($_FILES) && is_array($_FILES) && count($_FILES)>0) { $raw_array = array_merge($_POST,$_FILES); } }