src/Charcoal/Admin/Action/Tinymce/UploadImageAction.php
public function run(RequestInterface $request, ResponseInterface $response)
    {
        $path = $request->getParam('upload_path');

        if (!!$path) {
            $this->setUploadPath($path);
        }

        $this->uploadedPath = $this->fileUpload($_FILES['file']);

        $this->setSuccess(!!$this->uploadedPath);

        return $response;
    }
public function run(RequestInterface $request, ResponseInterface $response)
    {
        $path = $request->getParam('upload_path');

        if (!!$path) {
            $this->setUploadPath($path);
        }

        $this->uploadedPath = $this->fileUpload($_FILES['file']);

        $this->setSuccess(!!$this->uploadedPath);

        return $response;
    }
public function run ( RequestInterface $ request , ResponseInterface $ response ) { $ path = $ request -> getParam ( 'upload_path' ) ; if ( ! ! $ path ) { $ this -> setUploadPath ( $ path ) ; } $ this -> uploadedPath = $ this -> fileUpload ( $ _FILES [ 'file' ] ) ; $ this -> setSuccess ( ! ! $ this -> uploadedPath ) ; return $ response ; }
Gets a psr7 request and response and returns a response.

Called from `__invoke()` as the first thing.

@param RequestInterface  $request  A PSR-7 compatible Request instance.
@param ResponseInterface $response A PSR-7 compatible Response instance.
@return ResponseInterface
Gets a psr7 request and response and returns a response .