private function buildData($originalName, $extension)
    {
        $tmpDirectory = $this->getApplication()->getTemporaryDir();
        $fileName = md5($originalName . uniqid('', true)) . '.' . $extension;

        $data = [
            'originalname' => $originalName,
            'path'         => $tmpDirectory . DIRECTORY_SEPARATOR . $fileName,
            'filename'     => $fileName
        ];

        return $data;
    }