Ejemplo n.º 1
0
 public function storeFile($filePath)
 {
     $image = new ImageProcessor($filePath, $this->maxDimensions, $this->maxFileSize);
     $image->process();
     $this->deleteFile();
     $this->hash = hash_file('sha256', $image->inputPath);
     $this->ext = $image->ext();
     $this->storage()->put($this->filePath(), file_get_contents($image->inputPath));
 }
Ejemplo n.º 2
0
 public function storeFile($filePath)
 {
     $image = new ImageProcessor($filePath, $this->getMaxDimensions(), $this->getMaxFileSize());
     $image->process();
     $this->_storeFile($image->inputPath, $image->ext());
 }
Ejemplo n.º 3
0
 public function storeFile($filePath)
 {
     $image = new ImageProcessor($filePath, $this->getMaxDimensions(), $this->getMaxFileSize());
     $image->process();
     $this->deleteFile();
     $this->setFileProperties(['hash' => hash_file('sha256', $image->inputPath), 'ext' => $image->ext()]);
     $this->storage()->put($this->filePath(), file_get_contents($image->inputPath));
 }