protected function validateFileUpload()
    {
        if ($this->isError()) {
            return null;
        }

        $submitted_files = $this->getSubmitted('files');

        /* @var $file \SplFileInfo */
        $file = reset($submitted_files);
        $request_files = $this->request->file('files');

        if (empty($request_files['name'][0])) {
            $this->setErrorRequired('files', $this->translation->text('Files'));
            return false;
        }

        $result = $this->file_transfer->uploadMultiple($request_files, false, $file->getRealPath());
        $this->setSubmitted('uploaded', $result);
        return true;
    }