check file formato on get_pdf_cover method
This commit is contained in:
parent
949493d61f
commit
0ea6d5d0ad
|
@ -105,6 +105,10 @@ class Media {
|
|||
return null;
|
||||
}
|
||||
|
||||
if ( mime_content_type($filepath) != 'application/pdf') {
|
||||
return null;
|
||||
}
|
||||
|
||||
$imagick = new \Imagick($filepath);
|
||||
$imagick->setIteratorIndex(0);
|
||||
$imagick->setImageFormat('jpg');
|
||||
|
|
Loading…
Reference in New Issue