protected function handleUniqueFile($file)
    {
        $uploadedFile = null;

        //The current file was uploaded successfully?
        if (!$file['error']) {
            $uploadedFile = new UploadedFile(
                $file['tmp_name'],
                $file['name'],
                $file['type']
            );
        }

        return $uploadedFile;
    }