protected function validateUploadFile()
    {
        $file = $this->request->file('file');

        if (empty($file)) {
            return null;
        }

        $result = $this->file_transfer->upload($file, null);

        if ($result !== true) {
            $this->setError('path', (string) $result);
            return false;
        }

        $this->setSubmitted('path', $this->file_transfer->getTransferred(true));
        return true;
    }