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;
    }
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;
    }
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 ; }
Handle a file input, when it IS NOT 'multiple'.

@param array $file An element from $_FILES superglobal

@return UploadedFile|null
Handle a file input when it IS NOT multiple .