Ejemplo n.º 1
0
 /**
  * Set current file thumb property
  *
  * @param bool $uploading
  * @return $this
  * @throws FileManagerException
  */
 public function setFileThumb($uploading = false)
 {
     if ($this->isImage()) {
         $this->file->thumb = $this->url->forName($this->getPath(), $this->fullName(), 'thumb');
         if (!$uploading) {
             list($width, $height) = getimagesize($this->fullPath());
             $this->file->size = [$width, $height];
             $this->file->thumbs = $this->thumb->details($this);
         }
     } else {
         $this->file->thumb = $this->icon->get($this->mime);
     }
     return $this;
 }