/**
  * Converts the given string or array to a ResourcePointer object.
  *
  * If the input format is an array, this method assumes the resource to be a
  * fresh file upload and imports the temporary upload file through the
  * resource manager.
  *
  * @param array $source The upload info (expected keys: error, name, tmp_name)
  * @param string $targetType
  * @param array $convertedChildProperties
  * @param \TYPO3\FLOW3\Property\PropertyMappingConfigurationInterface $configuration
  * @return \TYPO3\Media\Domain\Model\Image An object or an instance of TYPO3\FLOW3\Error\Error if the input format is not supported or could not be converted for other reasons
  * @throws \TYPO3\FLOW3\Property\Exception\TypeConverterException
  */
 public function convertFrom($source, $targetType, array $convertedChildProperties = array(), \TYPO3\FLOW3\Property\PropertyMappingConfigurationInterface $configuration = NULL)
 {
     $resource = $this->resourceManager->importUploadedResource($_FILES['file']);
     if ($resource === FALSE) {
         throw new \TYPO3\FLOW3\Property\Exception\TypeConverterException('Resource could not be converted.', 1316428994);
     }
     $image = new \TYPO3\Media\Domain\Model\Image($resource);
     // TODO: this should maybe be settable
     $image->setTitle('');
     return $image;
 }