src/Easy/Element/ImageUploader.php
function setValue($value)
    {
        if ($this->deleteable == 'N') {
            
        } else {
            $delete_user_opt = Openbizx::$app->getClientProxy()->getFormInputs($this->objectName . "_DELETE");
            if ($delete_user_opt) {
                $this->value = "";
                return;
            } else {
                if (count($_FILES) > 0) {
                    
                } else {
                    $this->value = $value;
                }
            }
        }

        if (count($_FILES) > 0) {
            if (!$this->uploaded && $_FILES[$this->objectName]["size"] > 0) {
                $picFileName = parent::setValue($value);
                if ((int) $this->picWidth > 0 || (int) $this->picHeight > 0) {
                    //resize picture size
                    $fileName = $this->uploadRoot . $picFileName;
                    $width = $this->picWidth;
                    $height = $this->picHeight;
                    $quality = $this->picQuality;

                    $this->resizeImage($fileName, $fileName, $width, $height, $quality);
                }
                if (
                        ((int) $this->thumbWidth > 0 || (int) $this->thumbHeight > 0) &&
                        $this->thumbFolder != ""
                ) {
                    //generate thumbs picture
                    if (!is_dir($this->uploadRoot . $this->thumbFolder)) {
                        mkdir($this->uploadRoot . $this->thumbFolder, 0777, true);
                    }
                    $file = $_FILES[$this->objectName];
                    $thumbPath = $this->thumbFolder . "/thumbs-" . date("YmdHis") . "-" . urlencode($file['name']);
                    $thumbFileName = $this->uploadRoot . $thumbPath;
                    $width = $this->thumbWidth;
                    $height = $this->thumbHeight;
                    $quality = $this->thumbQuality;

                    $this->resizeImage($fileName, $thumbFileName, $width, $height, $quality);

                    $result = array('picture' => $this->uploadRootURL . $picFileName, 'thumbpic' => $this->uploadRootURL . $thumbPath);
                    $this->value = serialize($result);
                }
            }
        } else {
            $this->value = $value;
        }
    }
function setValue($value)
    {
        if ($this->deleteable == 'N') {
            
        } else {
            $delete_user_opt = Openbizx::$app->getClientProxy()->getFormInputs($this->objectName . "_DELETE");
            if ($delete_user_opt) {
                $this->value = "";
                return;
            } else {
                if (count($_FILES) > 0) {
                    
                } else {
                    $this->value = $value;
                }
            }
        }

        if (count($_FILES) > 0) {
            if (!$this->uploaded && $_FILES[$this->objectName]["size"] > 0) {
                $picFileName = parent::setValue($value);
                if ((int) $this->picWidth > 0 || (int) $this->picHeight > 0) {
                    //resize picture size
                    $fileName = $this->uploadRoot . $picFileName;
                    $width = $this->picWidth;
                    $height = $this->picHeight;
                    $quality = $this->picQuality;

                    $this->resizeImage($fileName, $fileName, $width, $height, $quality);
                }
                if (
                        ((int) $this->thumbWidth > 0 || (int) $this->thumbHeight > 0) &&
                        $this->thumbFolder != ""
                ) {
                    //generate thumbs picture
                    if (!is_dir($this->uploadRoot . $this->thumbFolder)) {
                        mkdir($this->uploadRoot . $this->thumbFolder, 0777, true);
                    }
                    $file = $_FILES[$this->objectName];
                    $thumbPath = $this->thumbFolder . "/thumbs-" . date("YmdHis") . "-" . urlencode($file['name']);
                    $thumbFileName = $this->uploadRoot . $thumbPath;
                    $width = $this->thumbWidth;
                    $height = $this->thumbHeight;
                    $quality = $this->thumbQuality;

                    $this->resizeImage($fileName, $thumbFileName, $width, $height, $quality);

                    $result = array('picture' => $this->uploadRootURL . $picFileName, 'thumbpic' => $this->uploadRootURL . $thumbPath);
                    $this->value = serialize($result);
                }
            }
        } else {
            $this->value = $value;
        }
    }
Set value of element

@param mixed $value
@return mixed