Ejemplo n.º 1
0
 /**
  * Helper function: Initialize the UploadStashFile for a given file.
  *
  * @param $path String: path to file
  * @param $key String: key under which to store the object
  * @throws UploadStashZeroLengthFileException
  * @return bool
  */
 protected function initFile($key)
 {
     $file = new UploadStashFile($this->repo, $this->fileMetadata[$key]['us_path'], $key);
     if ($file->getSize() === 0) {
         throw new UploadStashZeroLengthFileException("File is zero length");
     }
     $this->files[$key] = $file;
     return true;
 }
 public function getUrlGenerator()
 {
     return parent::getUrlGenerator()->fromStash();
 }