From 3531f71a0c90a4f579c25ef366ff23cf80ffdb12 Mon Sep 17 00:00:00 2001 From: sctn4elk Date: Mon, 13 May 2024 23:12:50 -0500 Subject: [PATCH] Work on image process --- Controller/API/ImageController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Controller/API/ImageController.php b/Controller/API/ImageController.php index 5c89790..828e64e 100644 --- a/Controller/API/ImageController.php +++ b/Controller/API/ImageController.php @@ -11,7 +11,6 @@ class ImageController extends BaseController { public $imageModel; public $action; - #[\Override] function __construct() { parent::__construct(); $this->basename = "ImageController"; @@ -24,7 +23,6 @@ class ImageController extends BaseController { $this->strErrorDesc = ''; $this->strErrorHeader = ''; try { - $this->imageModel = new ImageModel(); $this->requestMethod = $this->getServerRequestMethod(); switch($this->action) { @@ -76,6 +74,9 @@ class ImageController extends BaseController { $this->strErrorHeader = 'HTTP/1.1 422 Unprocessable Request'; return; } + + $this->imageModel = new ImageModel(); + // reads the raw POST data and returns it as a string. //base64_decode($_POST['content']); $imagePayload = file_get_contents($_FILES['your_image_name']['tmp_name']);