/**
  * Holds an uploaded file
  * @param \CIC\Cicbase\Domain\Model\File $fileObject
  * @param string $key
  * @return \CIC\Cicbase\Domain\Model\File|\TYPO3\CMS\Extbase\Error\Error
  * @throws \Exception
  */
 public function hold(\CIC\Cicbase\Domain\Model\File $fileObject, $key = '')
 {
     $baseStoragePath = $this->getHoldStoragePath();
     if ($fileObject->getIsSaved() == false) {
         $relativeDestinationPath = $this->getRelativeDestinationPath($fileObject, $baseStoragePath);
         $destinationFilename = $this->getDestinationFilename($fileObject);
         $results = $this->moveToDestination($relativeDestinationPath, $destinationFilename, $fileObject, false);
         if ($results instanceof \TYPO3\CMS\Extbase\Error\Error) {
             return $results;
         } else {
             $cache = $this->getCache();
             $cacheKey = $this->getCacheKey($key);
             $cache->set($cacheKey, serialize($fileObject), array('heldFile'), 3600);
             return $fileObject;
         }
     } else {
         throw new \Exception('Cannot hold a file object that has already been saved.');
     }
 }