1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-10 23:24:04 +02:00

fix(helpers): fix upload function image processing

This commit is contained in:
Awilum
2021-09-03 12:29:31 +03:00
parent 55be04bfa5
commit 89da247688

View File

@@ -45,9 +45,12 @@ if (! function_exists('upload')) {
try {
$result->confirm();
// If upload file is image, do image file processing
if (isset($result->name)) {
if ($result->name) {
$mediaFile = $uploadFolder . '/' . $result->name;
if (getimagesize($mediaFile)) {
imageFile($mediaFile, $settings['process']['image']);
}