mirror of
https://github.com/sctn4elk/CustomerRewardsRESTAPI.git
synced 2025-01-09 15:44:29 -06:00
Work on image process
This commit is contained in:
parent
838bf4d5dd
commit
3531f71a0c
|
@ -11,7 +11,6 @@ class ImageController extends BaseController {
|
||||||
public $imageModel;
|
public $imageModel;
|
||||||
public $action;
|
public $action;
|
||||||
|
|
||||||
#[\Override]
|
|
||||||
function __construct() {
|
function __construct() {
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
$this->basename = "ImageController";
|
$this->basename = "ImageController";
|
||||||
|
@ -24,7 +23,6 @@ class ImageController extends BaseController {
|
||||||
$this->strErrorDesc = '';
|
$this->strErrorDesc = '';
|
||||||
$this->strErrorHeader = '';
|
$this->strErrorHeader = '';
|
||||||
try {
|
try {
|
||||||
$this->imageModel = new ImageModel();
|
|
||||||
$this->requestMethod = $this->getServerRequestMethod();
|
$this->requestMethod = $this->getServerRequestMethod();
|
||||||
|
|
||||||
switch($this->action) {
|
switch($this->action) {
|
||||||
|
@ -76,6 +74,9 @@ class ImageController extends BaseController {
|
||||||
$this->strErrorHeader = 'HTTP/1.1 422 Unprocessable Request';
|
$this->strErrorHeader = 'HTTP/1.1 422 Unprocessable Request';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->imageModel = new ImageModel();
|
||||||
|
|
||||||
// reads the raw POST data and returns it as a string.
|
// reads the raw POST data and returns it as a string.
|
||||||
//base64_decode($_POST['content']);
|
//base64_decode($_POST['content']);
|
||||||
$imagePayload = file_get_contents($_FILES['your_image_name']['tmp_name']);
|
$imagePayload = file_get_contents($_FILES['your_image_name']['tmp_name']);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user