Fixed: unline file after getting pdf filesize
This commit is contained in:
parent
4008643e5b
commit
58d4f260da
|
@ -50,7 +50,7 @@ class PdfCompressor extends Compressor
|
|||
{
|
||||
$filename = $this->extractImage($this->media->root());
|
||||
$size = getimagesize($filename);
|
||||
@unlink($file);
|
||||
unlink($filename);
|
||||
|
||||
return $size;
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ class PngCompressor extends Compressor {
|
|||
|
||||
public function make(string $path): array
|
||||
{
|
||||
$output = "/tmp/".str_slug(microtime());
|
||||
$output = $this->tmpPath();
|
||||
$mimetype = mime_content_type($path);
|
||||
|
||||
system('imagemin '.escapeshellarg($path).' --plugin=pngquant > '.escapeshellarg($output));
|
||||
|
|
Loading…
Reference in New Issue