protected function _validateUpload() : bool
    {
        if (! $this->request->getData('file')) {
            $this->flash->error('Please choose a file to upload.');

            return false;
        }

        if (! in_array($this->request->getData('file.type'), $this->__supportedMimeTypes)) {
            $this->flash->error('Unable to upload file, unsupported file provided.');

            return false;
        }

        return true;
    }